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.
Luau
DrawingImmediate.Text(
position: Vector2,
font: number | DrawFont | DrawingObject,
size: number,
color: Color3,
opacity: number,
text: string,
center: boolean
) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
position | Vector2 | Text anchor in screen pixels; its X coordinate is the center when center is true. |
font | number | DrawFont | DrawingObject | Built-in font number, registered DrawFont, or Drawing Font object. |
size | number | Font size in pixels. |
color | Color3 | Color3 of the primitive or text. |
opacity | number | Opacity from 0 (invisible) to 1 (opaque). |
text | string | Text to display. |
center | boolean | Whether 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
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)