isElement
Shared
Tells whether a value is an element that still exists.
bool isElement(any value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | Any value. It raises no error if it is not an element. |
Returns
true if it is an existing element, false for any other value or for an element already destroyed.
Example
local blip = createElement("checkpoint")
setTimer(function()
if isElement(blip) then
destroyElement(blip)
end
end, 5000, 1)