Drawing. clear Synchronous
cleardrawcache
Remove every active drawing object at once. This is useful when a script is tearing down an entire overlay or resetting its drawing state.
Luau
Drawing.clear() -> ()Parameters
This function takes no arguments.
Returns
()No values.
Usage notes
This affects drawings created by other code too. Use object:Remove() when you only own one object.
cleardrawcache is an alias. Previously held handles become inactive and report __OBJECT_EXISTS=false.
Example
Luau
local marker = Drawing.new("Circle")
marker.Radius = 8
marker.Position = Vector2.new(80, 80)
marker.Visible = true
-- Only use clear when you intend to remove every drawing.
Drawing.clear()
print(isrenderobj(marker)) -- false