# setFogDistance (Client)

> Changes how far from the camera the fog starts, over the time cycle, until `resetFogDistance` restores it.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: World and weather
- **URL**: https://wiki.mymp.gg/en/setFogDistance

## Syntax

```lua
bool setFogDistance(float distance)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `distance` | `float` | The distance in metres, from 0 to 20000. |

## Returns

`true` once the value is set.

## Example

```lua
setFogDistance(50)
```

## See also

- [getFogDistance (Client)](https://wiki.mymp.gg/en/getFogDistance.md): Returns how far the fog starts: the value setFogDistance set or, without it, the time cycle's.
- [resetFogDistance (Client)](https://wiki.mymp.gg/en/resetFogDistance.md): Undoes setFogDistance: the fog follows the time cycle again.
