Drawing objects
Shared properties and lifetime of retained drawings.
Create an object with Drawing.new. Each object is an executor handle table, not a Roblox Instance.
Shared properties
| Member | Type / signature | Meaning |
|---|---|---|
Visible | boolean | Whether the renderer draws the object. |
ZIndex | number | Draw ordering. |
Transparency | number | Opacity: 0 invisible, 1 opaque. Clamped to that range. |
Color | Color3 | Object color. |
Thickness | number | Stroke thickness for applicable primitives. |
__OBJECT_EXISTS | boolean | Readonly renderer-lifetime indicator. |
Lifetime
local object = Drawing.new("Line")
object.From = Vector2.new(20, 20)
object.To = Vector2.new(100, 20)
object.Visible = true
object:Remove()Remove() and Destroy() are aliases that retire the drawing. cleardrawcache removes every drawing. The renderer pool holds 1,024 drawings; do not retain stale handles across a teleport or reuse a removed handle.
