M MY Multiplayer: Wiki
Side
Kind

getLightSize

Client

Reads a rect light's width and height.

float|false getLightSize(light light)

Parameters

NameTypeDescription
lightlightThe light.

Returns

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

Example

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)
NoteRect lights only. On a point or spot light it logs a warning naming its type and returns false.

See also