isrenderobj Synchronous

Check whether a value is a drawing handle that still refers to a live object. This is useful before updating a handle kept in a table after some objects may have been removed.

Syntax
Luau
isrenderobj(value: any) -> boolean

Parameters

Function parameters
ParameterTypeDescription
valueanyAny value to inspect.

Returns

boolean

true for an existing DrawingObject; false for other values and removed drawings.

Usage notes

A removed handle can still be held in a variable, so ordinary truthiness does not tell you whether it is usable.

Example

Example
Luau
local marker = Drawing.new("Circle")
print(isrenderobj(marker)) -- true
marker:Remove()
print(isrenderobj(marker)) -- false
Kawaii documentation