DrawingImmediate.FilledTriangle Synchronous

Fill the area between three screen points. A filled triangle can serve as a compact arrowhead or another directional accent.

Syntax
Luau
DrawingImmediate.FilledTriangle(
    a: Vector2,
    b: Vector2,
    c: Vector2,
    color: Color3,
    opacity: number
) -> ()

Parameters

Function parameters
ParameterTypeDescription
aVector2First vertex.
bVector2Second vertex.
cVector2Third vertex.
colorColor3Color3 of the primitive or text.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).

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

Example
Luau
local paint = DrawingImmediate.GetPaint()
local connection = paint:Connect(function()
    DrawingImmediate.FilledTriangle(Vector2.new(100, 40), Vector2.new(40, 140), Vector2.new(160, 140), Color3.fromRGB(240, 150, 190), 0.8)
end)
task.delay(3, function() connection:Disconnect() end)
Kawaii documentation