# Character.setDiving

Sets whether the character is diving.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
character:setDiving( state )
```

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

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `character` | [Character](../Game-Script-Environment/Userdata/Character.md) | The character. |
| `state` | boolean | The diving state. |
