Volt

Drawing

The Drawing library provides functions for creating and managing visual overlays that render on top of the Roblox viewport.

Overview

Drawing objects allow you to create:

  • Lines and shapes
  • Text labels
  • Images
  • Custom UI elements

These drawings are rendered directly on the screen and are not part of the Roblox UI system, making them hidden from game scripts.

Available Functions

FunctionDescription
cleardrawcacheClear all cached drawing objects
getrenderpropertyGet a property from a drawing object
isrenderobjCheck if a value is a drawing object
setrenderpropertySet a property on a drawing object

Creating Drawing Objects

Use Drawing.new(type) to create new drawing objects:

local line = Drawing.new("Line")
line.From = Vector2.new(0, 0)
line.To = Vector2.new(100, 100)
line.Color = Color3.fromRGB(255, 0, 0)
line.Thickness = 2
line.Visible = true

Drawing Types

TypeDescription
LineA line between two points
CircleA circle with center and radius
SquareA rectangle
TriangleA triangle with three vertices
TextText label
ImageAn image/texture
QuadA quadrilateral with four vertices

Common Properties

All drawing objects share these properties:

PropertyTypeDescription
VisiblebooleanWhether the object is visible
ZIndexnumberRendering order (higher = on top)
TransparencynumberTransparency (0 = opaque, 1 = invisible)
ColorColor3The object's color

Cleanup

Always remove drawing objects when done:

local circle = Drawing.new("Circle")
-- ... use the circle ...
circle:Remove()

On this page