# getLightSize (Client)

> Reads a rect light's width and height.

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

## Syntax

```lua
float|false getLightSize(light light)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `light` | `light` | The light. |

## Returns

Two numbers: the width and the height in metres, or `false` with a wrong argument.

## Example

```lua
local light = createRectLight(0, 0, 5, 0, -1, 0, 8, 255, 255, 255, 2, 0.5)
local width, height = getLightSize(light)
outputDebugString(width .. " x " .. height)
```

### Note

Rect lights only. On a point or spot light it logs a warning naming its type and returns `false`.

## See also

- [setLightSize (Client)](https://wiki.mymp.gg/en/setLightSize.md): Changes a rect light's width and height.
- [getLightBarnDoor (Client)](https://wiki.mymp.gg/en/getLightBarnDoor.md): Reads a rect light's barn doors.
