# HarvestableClass.client_onAction

Called when the harvestable receives input from a player with the [Character](../Game-Script-Environment/Userdata/Character.md) locked to the [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md).

**Kind:** Callback

**Environments:** Game

## Game

**Callback side:** Client

``` { .lua .api-signature }
HarvestableClass:client_onAction( action, state )
```

[Open the full Game reference](../Game-Script-Environment/Classes/HarvestableClass.md#client_onaction)

When a [Character](../Game-Script-Environment/Userdata/Character.md) is seated in a [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md) with a "seat" component, the [Character](../Game-Script-Environment/Userdata/Character.md) is also considered locked to the [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md).

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `self` | table | The class instance. |
| `action` | integer | The action as an integer value. More details in [sm.interactable.actions](../Game-Script-Environment/Static-Functions/sm.interactable.md#actions). |
| `state` | boolean | True on begin action, false on end action. |
