DrawingImmediate. Triangle Synchronous
Draw the three edges joining screen points a, b, and c. Use an outline when the interior should remain visible beneath a pointer or marker.
Luau
DrawingImmediate.Triangle(
a: Vector2,
b: Vector2,
c: Vector2,
color: Color3,
opacity: number,
thickness: number
) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
a | Vector2 | First vertex. |
b | Vector2 | Second vertex. |
c | Vector2 | Third vertex. |
color | Color3 | Color3 of the primitive or text. |
opacity | number | Opacity from 0 (invisible) to 1 (opaque). |
thickness | number | Stroke width in screen pixels. |
Returns
()No values.
Usage notes
Immediate primitives last for one paint cycle. Submit the call again from a GetPaint listener to keep it visible; there is no object handle to update or remove.
Example
Luau
local paint = DrawingImmediate.GetPaint()
local connection = paint:Connect(function()
DrawingImmediate.Triangle(Vector2.new(100, 40), Vector2.new(40, 140), Vector2.new(160, 140), Color3.fromRGB(240, 150, 190), 1, 2)
end)
task.delay(3, function() connection:Disconnect() end)