Text2D

Write titles, labels and scores right over your scene in any font, then outline, shadow, glow or bevel them as in Photoshop.

A Text2D draws its Text over the DataModel's picture, centred in its box at 0.72 of the box's height, in its Font, a FontContent (Segoe UI when there is none). Position, AnchorPoint, Size and Scale place it in pixels from the top-left; Color and Transparency tint and fade it; In and Out animations fade, slide, pop or wipe it. Layer styles under it, like Stroke and DropShadow, draw with it.

Example

Text with a stroke and a drop shadowLuau
local dm = Root:FindFirstChild("LF2D", true)
local t = Instance.new("Text2D", dm)
t.Text = "Layer Styles"
t.Position = Vector2.new(40, 30)
t.Size = Vector2.new(560, 130)
t.Color = Color3.new(1, 1, 1)
local s = Instance.new("Stroke", t)
s.Size = 9
local sh = Instance.new("DropShadow", t)
sh.Distance = 8
sh.Size = 10

Properties

Text

NameTypeDefaultDescription
FontFontContentThe font file it draws with; with none it uses Segoe UI.
Textstring"Text"The text it shows, centred and sized to 0.72 of the box height.

Scripts

TextColor3Color3scripts onlyRoblox's name for Color, which Luau takes as an alias.
TextTransparencynumberscripts onlyRoblox's name for Transparency, which Luau takes as an alias.
From Base2D 19
From Instance 22