# GuiInterface.setSliderCallback

Sets a callback to be called when the slider is moved

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
guiInterface:setSliderCallback( sliderName, callback )
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `gui` | [GuiInterface](../Game-Script-Environment/Userdata/GuiInterface.md) | The Gui interface |
| `sliderName` | string | The button name |
| `callback` | string | Function to be called when slider is moved |
