Drawing

Create persistent visual overlays rendered above the game viewport with the Drawing library, including lines, shapes, text, and images.

Overview

Shapes drawn on top of the game, completely outside the instance tree. Nothing in PlayerGui and no ScreenGui for a game to find, which is why basically every ESP uses this.

Make an object with Drawing.new, set its properties, and move it around. The Guide: Building an ESP chapter turns that into a working ESP.

One object, start to end
local box = Drawing.new("Square")
box.Color = Color3.fromRGB(80, 160, 255)
box.Thickness = 1
box.Filled = false
box.Position = Vector2.new(100, 100)
box.Size = Vector2.new(60, 120)
box.Visible = true

-- Objects belong to the renderer, not to Luau. Remove them yourself.
box:Remove()

Don't call Drawing.new in a render loop

It makes a new object every frame and never frees them. Make your objects once, then move them. cleardrawcache() is the fix if you've lost track of them.

Constructor

Shared properties

Every Drawing type has these. ZIndex sets which one is on top, and __OBJECT_EXISTS tells you if the object still exists after Remove.

Line

Circle

Square

Triangle

Quad

Text

Image

Property helpers

Generic getters and setters for when you don't know the object type. Useful if you have a config table driving an overlay.

Fonts