# Harvestable.setPublicData

Sets (server) public data on a harvestable.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
harvestable:setPublicData( data )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Harvestable.md#setpublicdata)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `harvestable` | [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md) | The harvestable. |
| `data` | table | The public data. |
