# Character.setSwimming

Sets whether the character is swimming.

**Kind:** Function

**Environments:** Game

## Game

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

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

**Availability:** Server only

> **Note:**
> By default the swimming state is controlled by the client as part of the player movement. This value is treated like an override that is synchronized from the server. Buoyancy calculations in the character controller require that the character touches a liquid volume.

**Parameters:**

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