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


After: A Text2D with Text Size 72 in a box 1600 by 110 pixels at the top of the frame.
A Text2D draws its Text in its box over the DataModel's picture, like Roblox's TextLabel. AlignX, AlignY, Scaled and Wrapped work as there, and TextSize 0, the default, fits it to 0.72 of the box's height. Its Font is 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. Layer styles under it, like Stroke and DropShadow, draw with it.
Example
-- the first scene in your project (Studio in a new one)
local dm = Root:FindFirstChildWhichIsA("DataModel", 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 |
|---|---|---|---|
| AlignX | number | 0.5 0 to 1 | |
| AlignY | number | 0.5 0 to 1 | |
| Font | FontContent | The font file it draws with; with none it uses Segoe UI. | |
| LineHeight | number | 1 0.1 to 10 | |
| MaxTextSize | number | 100 1 to 1000 | |
| MaxVisibleGraphemes | number | -1 -1 (all) or 0 and up | |
| MinTextSize | number | 1 1 to 1000 | |
| PlaceholderColor3 | Color3 | ||
| PlaceholderText | string | ||
| Rich | boolean | false | |
| Scaled | boolean | false | |
| Text | string | "Text" | The text it shows, centred by default; with TextSize 0 it fits 0.72 of the box height. |
| TextSize | number | 0 0 to 1000 | |
| TextSizeConstraint | string | "" | |
| Truncate | string | SplitWord None, AtEnd, SplitWord | |
| Wrapped | boolean | false |
Interaction
| AutoButtonColor | boolean | |
| Modal | boolean | |
| Selected | boolean |
Behavior
| ClearTextOnFocus | boolean | |
| MultiLine | boolean | |
| TextEditable | boolean |
Roblox
| RobloxClass | string | "" TextLabel, TextButton, TextBox |
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. |
