# setLightRadius (Client)

> Changes a light's range.

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

## Syntax

```lua
bool setLightRadius(light light, float radius)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `light` | `light` | The light. |
| `radius` | `float` | Range in metres, above 0 and up to 1000. |

## Returns

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

If a spot light's source radius ends up larger than the new range, it is reduced to the range.

## Example

```lua
local light = createPointLight(2495.1, -1687.4, 14.5, 5)
setLightRadius(light, 25)
```

## See also

- [getLightRadius (Client)](https://wiki.mymp.gg/en/getLightRadius.md): Reads a light's range.
- [setLightFalloff (Client)](https://wiki.mymp.gg/en/setLightFalloff.md): Changes how a light fades toward the end of its range.
- [setLightSourceRadius (Client)](https://wiki.mymp.gg/en/setLightSourceRadius.md): Changes the size of a spot light's bulb. A larger bulb makes highlights and shadows softer.
