# ScriptableObjectClass.server_onRefresh

Called if the Lua script attached to the object is modified while the game is running.

**Kind:** Callback

**Environments:** Game

## Game

**Callback side:** Server

``` { .lua .api-signature }
ScriptableObjectClass:server_onRefresh(  )
```

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

> **Note:**
> This event requires Scrap Mechanic to be running with the '-dev' flag. This will allow scripts to automatically refresh upon changes.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `self` | table | The class instance. |
