# setLightIntensity (Client)

> Changes a light's brightness.

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

## Syntax

```lua
bool setLightIntensity(light light, float intensity)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `light` | `light` | The light. |
| `intensity` | `float` | Brightness multiplier, from 0 to 1000. At 1, a white light shines with an HDR radiance of 12. |

## Returns

`true` if it changed. With a wrong argument it logs a warning and returns `false`.

A new light starts at intensity 1.

## Example

```lua
local light = createPointLight(2495.1, -1687.4, 14.5, 12)
addEventHandler("onClientRender", root, function()
    setLightIntensity(light, 1 + math.sin(getTickCount() / 200) * 0.5)
end)
```

## See also

- [getLightIntensity (Client)](https://wiki.mymp.gg/en/getLightIntensity.md): Reads a light's brightness.
- [setLightColor (Client)](https://wiki.mymp.gg/en/setLightColor.md): Changes a light's colour.
- [setLightFalloff (Client)](https://wiki.mymp.gg/en/setLightFalloff.md): Changes how a light fades toward the end of its range.
