TextLabel
TextLabel : GuiObject
Overview
Properties
Bold
bool
Bold is a boolean property that determines whether the text rendered by the UI element is displayed in bold font style. Use this property to emphasize specific text or create a visually impactful UI element.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.Bold = trueText
string
Text determines the content displayed on the Label.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.Text = "Hello"TextBounds
Vector2
Currently not supported.
Code Samples
TextColor3
Color3
TextColor3 represents a color property for text rendering in the UI element using RGB components.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextColor3 = Color3.new(255, 0, 0)TextFits
bool
Currently not supported.
Code Samples
TextScaled
bool
TextScaled controls whether text in a UI element is scaled to fill the available space or its parent widget.
This scaling behavior can be determined by the TextScaled property, which allows for dynamic resizing of rendered text to fit within the UI element's space.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextScaled = trueTextSize
number
TextSize determines the font size of the text rendered by the UI element.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextSize = 50TextTransparency
number
TextTransparency controls the transparency level of the text rendered by the UI element.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextTransparency = 0.5TextWrapped
bool
TextWrapped is a boolean property that determines whether text in a UI element wraps to multiple lines within the GUI element space, potentially truncating excess text.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextWrapped = trueTextXAlignment
Enum.TextXAlignment
TextXAlignment determines the horizontal alignment of rendered text within a UI element.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextXAlignment = Enum.TextXAlignment.LeftTextYAlignment
Enum.TextYAlignment
TextYAlignment determines the vertical alignment of rendered text within a UI element.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.TextYAlignment = Enum.TextYAlignment.TopMethods
Events
See also
GUILast updated