AcediaDocumentation

DrawingImmediate.Text

Draws text during the current paint callback.

Must run inside a GetPaint signal callback. This returns no retained object; redraw on every paint and disconnect the callback to stop drawing.

DrawingImmediate.Text(position: Vector2, font: number, size: number, color: Color3, opacity: number, text: string, center: boolean?): ()

Parameters

ParameterTypeDescription
positionVector2Text position.
fontnumberDrawing.Fonts ID, clamped to 0–3.
sizenumberFont size in pixels.
colorColor3Text color.
opacitynumber0 is invisible; 1 is opaque. Values are clamped.
textstringDisplayed text.
centerboolean?Center horizontally; defaults to false.

Errors: Calling outside a paint callback or supplying incompatible argument types raises an error.

On this page