AcediaDocumentation

DrawingImmediate.Line

Draws a line during the current paint callback.

Must run inside a GetPaint signal callback. This returns no retained object; redraw on every paint and disconnect the callback to stop drawing.

DrawingImmediate.Line(from: Vector2, to: Vector2, color: Color3, opacity: number, thickness: number): ()

Parameters

ParameterTypeDescription
fromVector2Start point.
toVector2End point.
colorColor3Line color.
opacitynumber0 is invisible; 1 is opaque. Values are clamped.
thicknessnumberStroke thickness.

Errors: Calling outside a paint callback or supplying incompatible argument types raises an error.

On this page