# getLightBarnDoor (Client)

> Reads a rect light's barn doors.

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

## Syntax

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

## Parameters

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

## Returns

Two numbers: the angle in degrees and the length in metres, or `false` with a wrong argument.

## Example

```lua
local light = createRectLight(0, 0, 5, 0, 0, -1)
local angle, length = getLightBarnDoor(light)
outputDebugString(angle .. " " .. length) -- 88 0.2
```

### Note

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

## See also

- [setLightBarnDoor (Client)](https://wiki.mymp.gg/en/setLightBarnDoor.md): Changes a rect light's barn doors, which limit where the light leaves the rectangle.
- [getLightSize (Client)](https://wiki.mymp.gg/en/getLightSize.md): Reads a rect light's width and height.
