M MY Multiplayer: Wiki
Side
Kind

setLightSize

Client

Changes a rect light's width and height.

bool setLightSize(light light, float width, float height)

Parameters

NameTypeDescription
lightlightThe light.
widthfloatWidth of the rectangle in metres, from 0.01 to 100.
heightfloatHeight of the rectangle in metres, from 0.01 to 100.

Returns

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

Example

local light = createRectLight(1481.0, -1771.0, 22.0, 0, -1, 0, 12)
setLightSize(light, 3, 0.2)
NoteRect lights only. On a point or spot light it logs a warning naming its type and returns false.

See also