M MY Multiplayer: Wiki
Side
Kind

setElementAlpha

Shared

Sets the transparency of an element and of all its children.

bool setElementAlpha(element element, int alpha)

Parameters

NameTypeDescription
elementelementThe element.
alphaintOpacity, an integer from 0 (invisible) to 255 (opaque).

Returns

true if it applied to the element itself, false if not. Raises an error if alpha is outside 0 to 255.

Example

addCommandHandler("ghost", function(player)
    setElementAlpha(player, 120)
end)

See also