Drawing.clear Synchronous

  • cleardrawcache

Remove every active object created by the drawing library. Use this for a complete drawing cleanup; use an object’s Remove method to delete only that object.

Syntax
Luau
Drawing.clear() -> ()

Parameters

This function takes no arguments.

Returns

()

This function returns no values.

Usage notes

cleardrawcache is an alias for Drawing.clear. Existing handles report __OBJECT_EXISTS=false after clearing.

Example

Example
Luau
local label = Drawing.new("Text")
label.Text = "Temporary example"
label.Position = Vector2.new(40, 40)
label.Visible = true
task.wait(2)
-- Removes ALL drawings, including those created elsewhere.
Drawing.clear()
print(isrenderobj(label)) -- false
Kawaii documentation