DrawingImmediate.Text Synchronous

Submit a line of text for the current frame. Use it when a label’s text or position changes continuously and a persistent Text drawing would need frequent property updates.

Syntax
Luau
DrawingImmediate.Text(
    position: Vector2,
    font: number | DrawFont | DrawingObject,
    size: number,
    color: Color3,
    opacity: number,
    text: string,
    center: boolean
) -> ()

Parameters

Function parameters
ParameterTypeDescription
positionVector2Text anchor in screen pixels; its X coordinate is the center when center is true.
fontnumber | DrawFont | DrawingObjectBuilt-in font number, registered DrawFont, or Drawing Font object.
sizenumberFont size in pixels.
colorColor3Color3 of the primitive or text.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).
textstringText to display.
centerbooleanWhether to center the text horizontally on Position.X.

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.Text(Vector2.new(40, 40), Drawing.Fonts.UI, 18, Color3.fromRGB(255, 255, 255), 1, "Ready", false)
end)
task.delay(3, function() connection:Disconnect() end)
Kawaii documentation