M MY Multiplayer: Wiki
Side
Kind

isElementLocal

Client

Tells whether an element was created by this client rather than by the server.

bool isElementLocal(element element)

Parameters

NameTypeDescription
elementelementThe element.

Returns

true if the element belongs to this client, false if it came from the server.

Example

for _, object in ipairs(getElementsByType("object")) do
    if isElementLocal(object) then
        destroyElement(object)
    end
end

See also