# GuiInterface.setButtonState

Sets the button state

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
guiInterface:setButtonState( buttonName, state )
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `gui` | [GuiInterface](../Game-Script-Environment/Userdata/GuiInterface.md) | The Gui interface |
| `buttonName` | string | The name of the button |
| `state` | boolean | The state of the button |
