DrawingImmediate.OutlinedText Synchronous

Submit text with a separately colored outline for one frame. A dark outline can help a light label remain readable over a changing background.

Syntax
Luau
DrawingImmediate.OutlinedText(
    position: Vector2,
    font: number | DrawFont | DrawingObject,
    size: number,
    color: Color3,
    opacity: number,
    outlineColor: Color3,
    outlineOpacity: 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).
outlineColorColor3Color3 used for the outline.
outlineOpacitynumberOutline opacity from 0 to 1.
textstringText to display.
centerbooleanWhether to center the text horizontally.

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