Yuari
Documentation
Docs/Drawing/object:Remove

object:Remove

Removes a drawing object.

Syntax

object:Remove() -> nil

Parameters

This function takes no parameters.

Returns

TypeDescription
nilThis function does not return a value.

Description

object:Remove is part of the Drawing library. Drawing objects are submitted to the module's overlay renderer. They persist between frames until you remove them or clear the cache.

The change is applied directly to the live target, so later reads observe the updated value.

The aliases object:Destroy() resolve to the same implementation.

Example

local box = Drawing.new("Square")
box:Remove()
local line = Drawing.new("Line")
line:Destroy()

Notes

  • Aliases: object:Destroy().
  • Remove drawing objects when they are no longer needed.