Yuari
Documentation
Docs/DrawingImmediate/DrawingImmediate.Line

DrawingImmediate.Line

Draws a line.

Syntax

DrawingImmediate.Line(from: any, to: any, color: Color3, thickness?: number) -> nil

Parameters

ParameterTypeDescription
fromanyThe from value used by the call.
toanyThe to value used by the call.
colorColor3The color value used by the call.
thickness?numberThe thickness value used by the call.

Returns

TypeDescription
nilThis function does not return a value.

Description

DrawingImmediate.Line is part of the DrawingImmediate library. Immediate drawing runs inside a paint callback registered with DrawingImmediate.GetPaint(); primitives are emitted for the current frame only.

The operation is performed immediately using the arguments supplied at the call site.

Example

-- inside a DrawingImmediate.GetPaint():Connect callback
DrawingImmediate.Line(Vector2.new(10, 10), Vector2.new(200, 10), Color3.new(1, 0, 0), 2)

Notes

  • Draw calls must run inside a callback registered with DrawingImmediate.GetPaint().