# getLightSize (Cliente)

> Lee el ancho y el alto de una luz rect.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Función Lua
- **Lado**: Cliente
- **Categoría**: Luces
- **URL**: https://wiki.mymp.gg/es/getLightSize

## Sintaxis

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

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `light` | `light` | La luz. |

## Retorno

Dos números: el ancho y el alto en metros, o `false` con un argumento incorrecto.

## Ejemplo

```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)
```

### Atención

Solo para luces rect. En una luz point o spot, registra un aviso que dice su tipo y devuelve `false`.

## Ver también

- [setLightSize (Cliente)](https://wiki.mymp.gg/es/setLightSize.md): Cambia el ancho y el alto de una luz rect.
- [getLightBarnDoor (Cliente)](https://wiki.mymp.gg/es/getLightBarnDoor.md): Lee las aletas de una luz rect.
