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
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 = 10Properties
Text
| Name | Type | Default | Description |
|---|---|---|---|
| Font | FontContent | The font file it draws with; with none it uses Segoe UI. | |
| Text | string | "Text" | The text it shows, centred and sized to 0.72 of the box height. |
Scripts
| TextColor3 | Color3 | scripts only | Roblox's name for Color, which Luau takes as an alias. |
| TextTransparency | number | scripts only | Roblox's name for Transparency, which Luau takes as an alias. |
