DrawingObject: Remove Synchronous
DrawingObject:Destroy
Permanently remove this one drawing. Call it when an overlay element closes or a temporary marker has served its purpose; the rest of your drawings remain.
Luau
DrawingObject:Remove() -> ()Parameters
Call this method with a DrawingObject receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
()No values.
Usage notes
Destroy is an alias of Remove. After removal, __OBJECT_EXISTS is false, isrenderobj returns false, and property writes are rejected.
Example
Luau
local marker = Drawing.new("Circle")
marker.Radius = 10
marker.Position = Vector2.new(60, 60)
marker.Visible = true
task.wait(2)
marker:Remove()
print(marker.__OBJECT_EXISTS) -- false