Yuari
Documentation
Docs/Drawing/Drawing.new

Drawing.new

Creates a Line, Text, Circle, Square, Triangle, Quad or Image object.

Syntax

Drawing.new(type: string) -> Drawing

Parameters

ParameterTypeDescription
typestringThe type value used by the call.

Returns

TypeDescription
DrawingThe returned Drawing.

Description

Drawing.new 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.

Each call creates or returns a fresh object or value that you can store and pass to other functions.

Example

local box = Drawing.new("Square")
box.Size = Vector2.new(120, 80)
box.Position = Vector2.new(100, 100)
box.Color = Color3.new(1, 1, 1)
box.Visible = true

Notes

  • Remove drawing objects when they are no longer needed.