Atomic docs

DrawingImmediate.GetPaint

DrawingImmediate.GetPaint(zIndex: number?): PaintHandle

A handle to draw through. Everything drawn on one handle shares a z index, which defaults to 0.

Example

lua
local paint = DrawingImmediate.GetPaint()
paint:Connect(function()
    DrawingImmediate.Line(Vector2.new(0, 0), Vector2.new(100, 100), Color3.new(1, 0, 0))
end)
↑