Skip to content
Immediate drawingOverview

DrawingImmediate.Line

Represents a line drawing command.

Details#

Draws a line between two Vector2 points, followed by optional Color3 (white) and thickness (1). Call inside a Paint callback; commands outside painting do not create retained objects. Returns no values.

Examples#

Example

Luau
local paint = DrawingImmediate.GetPaint()
local id = paint:Connect(function()
    DrawingImmediate.Line(Vector2.new(20, 20), Vector2.new(100, 60), Color3.new(1, 1, 1), 2)
end)
task.delay(1, function() paint:Disconnect(id) end)