VINDICTA
Rendering · Function
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

isrenderobj

Check whether a value is a valid Drawing object.

function isrenderobj(object: any): boolean

Synopsis

How it works

Checks whether a value is a valid Drawing object by verifying it exists in the executor's internal drawing object registryLua registryA hidden global table at pseudo-index LUA_REGISTRYINDEX, used by C code to store persistent references. Contains _LOADED (module cache), lua_ref references, thread refs, and callback storage. Shared across all threads in the VM.. Each Drawing.new() call registers the object in a hash set. This function performs an O(1)O(1)Constant-time complexity — the operation takes the same amount of time regardless of input size. A single hash-table lookup is O(1). lookup in that set. Returns false for removed objects, regular tables, or non-Drawing userdataUserdataA Luau type for C-allocated memory blocks. Roblox Instances, Vector3s, CFrames, and other engine types are userdata with metatables providing their API. Cannot be created from Luau directly..

Usage

Validate Drawing input at runtime
local square = Drawing.new("Square")
print(isrenderobj(square))     "cc">-- true
print(isrenderobj(workspace))  "cc">-- false
print(isrenderobj("text"))     "cc">-- false

Parameters

object any
The value to check.

Returns

boolean true if the value is a valid Drawing object, false otherwise.