Drawing
The Drawing class provides an interface for drawing shapes and text above the game window
Drawing.new
🏛️ Constructor
Create a new drawing object of the specified type.
The possible types are 'Line', 'Text', 'Image', 'Circle', 'Square', 'Quad', and 'Triangle'.
Parameters
type
- The type of drawing object to create.
Example
Drawing.Fonts
⭕ Static
🔒 Read-only
A table containing the available font names. The style of each font varies depending on the executor.
Fonts
Example
Drawing
🖥️ Class
BaseDrawing
The base class of which all drawing objects inherit. Cannot be instantiated.
Visible
boolean
Whether the drawing is visible. Defaults to false
on some executors.
ZIndex
number
Determines the order in which a Drawing renders relative to other drawings.
Transparency
number
The opacity of the drawing (1 is opaque, 0 is transparent).
Color
Color3
The color of the drawing.
Destroy(): ()
function
Destroys the drawing.
Line
Renders a line starting at From
and ending at To
.
From
Vector2
The starting point of the line.
To
Vector2
The ending point of the line.
Thickness
number
The thickness of the line.
Text
Renders text at Position
.
Text
string
The text to render.
TextBounds
🔒 Vector2
The size of the text. Cannot be set.
Font
Drawing.Font
The font to use.
Size
number
The size of the text.
Position
Vector2
The position of the text.
Center
boolean
Whether the text should be centered horizontally.
Outline
boolean
Whether the text should be outlined.
OutlineColor
Color3
The color of the outline.
Image
Draws the image data to the screen. Data
must be the raw image data.
Data
string
The raw image data.
Size
Vector2
The size of the image.
Position
Vector2
The position of the image.
Rounding
number
The rounding of the image.
Circle
Draws a circle that is centered at Position
.
This is not a perfect circle! The greater the value for NumSides
, the more accurate the circle will be.
NumSides
number
The number of sides of the circle.
Radius
number
The radius of the circle.
Position
Vector2
The position of the center of the circle.
Thickness
number
If Filled
is false, specifies the thickness of the outline.
Filled
boolean
Whether the circle should be filled.
Square
Draws a rectangle starting at Position
and ending at Position
+ Size
.
Size
Vector2
The size of the square.
Position
Vector2
The position of the top-left corner of the square.
Thickness
number
If Filled
is false, specifies the thickness of the outline.
Filled
boolean
Whether the square should be filled.
Quad
Draws a four-sided figure connecting to each of the four points.
PointA
Vector2
The first point.
PointB
Vector2
The second point.
PointC
Vector2
The third point.
PointD
Vector2
The fourth point.
Thickness
number
If Filled
is false, specifies the thickness of the outline.
Filled
boolean
Whether the quad should be filled.
Triangle
Draws a triangle connecting to each of the three points.
PointA
Vector2
The first point.
PointB
Vector2
The second point.
PointC
Vector2
The third point.
Thickness
number
If Filled
is false, specifies the thickness of the outline.
Filled
boolean
Whether the triangle should be filled.
cleardrawcache
🌎 Global
Destroys every drawing object in the cache. Invalidates references to the drawing objects.
Example
getrenderproperty
🌎 Global
Gets the value of a property of a drawing. Functionally identical to drawing[property]
.
Parameters
drawing
- The drawing to get the property of.property
- The property to get.
Example
isrenderobj
🌎 Global
Returns whether the given object is a valid Drawing.
Parameters
object
- Any object.
Example
setrenderproperty
🌎 Global
Sets the value of a property of a drawing. Functionally identical to drawing[property] = value
.
Parameters
drawing
- The drawing to set the property of.property
- The property to set.value
- The value to set the property to.
Example
Last updated