# engineSetParticleDensity (Client)

> Sets the fraction of effect particles that are emitted. The rest are dropped at random.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Graphics settings
- **URL**: https://wiki.mymp.gg/en/engineSetParticleDensity

## Syntax

```lua
bool engineSetParticleDensity(float density)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `density` | `float` | From 0 (none) to 1 (all). The default is 1. Anything else raises an error. |

## Returns

Always `true`.

The setting applies to the whole client and stays after the resource stops.

## Example

```lua
engineSetParticleDensity(0.5)
```

## See also

- [engineGetParticleDensity (Client)](https://wiki.mymp.gg/en/engineGetParticleDensity.md): Returns the fraction of effect particles that are emitted.
- [engineSetParticleScale (Client)](https://wiki.mymp.gg/en/engineSetParticleScale.md): Sets the fraction of the resolution particles are drawn at.
