# ClientScriptableObjectClass.client_onClientDataUpdate

Called when the client receives new client data updates from the server set with [Network.setClientData](../Game-Script-Environment/Userdata/Network.md#setclientdata).

**Kind:** Callback

**Environments:** Game

## Game

**Callback side:** Client

``` { .lua .api-signature }
ClientScriptableObjectClass:client_onClientDataUpdate( data, channel )
```

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

Data set in this way is persistent and the latest data will automatically be sent to new clients.

The data will arrive after [client_onCreate](../Game-Script-Environment/Classes/ClientScriptableObjectClass.md#client_oncreate) during the same tick.

Channel 1 will be received before channel 2 if both are updated.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `self` | table | The class instance. |
| `data` | any | Any lua object set with [Network.setClientData](../Game-Script-Environment/Userdata/Network.md#setclientdata) |
| `channel` | integer | Client data channel, 1 or 2. (default: 1) |
