Skip to content
Roblox API Reference

TextLabel

A 2D user interface element that displays non-interactive text.
Memory category
Gui
Own members
30
Inherited members
156
Subclasses
0
Siblings
2

Properties108

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromGuiBase2d17

Property categoryData

Property categoryDebugging

Property categoryLocalization

Property categorySelection

Inherited fromGuiObject39

Property categoryAppearance

Property categoryBehavior

  • Determines if descendant GuiObjects outside of the bounds of a parent GUI element should render.
    • Read capabilities: UI
  • Deprecated: This property is deprecated. Use UIDragDetector instead, as it supports more input types and can be better customized.
    Determines whether a GuiObject (and its descendants) can be dragged around the screen.
    • Deprecated
    • Read capabilities: UI

Property categoryData

Property categoryEventReplicator

Property categorySelection

Property categoryState

Defined byTextLabel29

Property categoryData

  • TextLabel.Confidential: boolean = false
    • Hidden
    • Not replicated
    • Not scriptable
    • Roblox engine security
    • Read capabilities: UI
  • TextLabel.LocalizedText: string = ""
    Read-only string containing the automatically-localized text that the TextLabel renders.
    • Hidden
    • Read only
    • Read capabilities: UI
    • Save only

Property categoryText

  • TextLabel.ContentText: string = "Label"
    A copy of TextLabel.Text that contains exactly what is being rendered by the TextLabel.
    • Read only
    • Read capabilities: UI
  • TextLabel.Font: Enum.Font = Enum.Font.Legacy
    Determines the font used to render text.
    • Hidden
    • Not replicated
    • Read capabilities: UI
    • Load only
  • TextLabel.FontFace: Font
    Determines the font used to render text.
    • Read capabilities: UI
  • TextLabel.LineHeight: number = 1
    Scales the spacing between lines of text in the TextLabel.
    • Read capabilities: UI
  • TextLabel.LocalizationMatchedSourceText: string = ""
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: UI
  • TextLabel.LocalizationMatchIdentifier: string = ""
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: UI
  • TextLabel.MaxVisibleGraphemes: number = -1
    The maximum number of graphemes the TextLabel can show.
    • Read capabilities: UI
  • TextLabel.OpenTypeFeatures: string = ""
    Applies OpenType typographic features to the text rendered by the TextLabel.
    • Read capabilities: UI
  • TextLabel.OpenTypeFeaturesError: string = ""
    Read-only property that describes why the TextLabel.OpenTypeFeatures string could not be applied.
    • Read only
    • Read capabilities: UI
    • Save only
  • TextLabel.RichText: boolean = false
    Determines whether the TextLabel renders its text using rich text formatting.
    • Read capabilities: UI
  • TextLabel.Text: string = "Label"
    Determines the string rendered by the TextLabel.
    • Read capabilities: UI
  • TextLabel.TextBounds: Vector2 = Vector2.zero
    Read-only property which reflects the absolute size of rendered text in
    • Read only
    • Read capabilities: UI
  • TextLabel.TextColor3: Color3 = Color3.new(0.105882, 0.164706, 0.207843)
    Determines the color of rendered text.
    • Read capabilities: UI
  • TextLabel.TextDirection: Enum.TextDirection = Enum.TextDirection.Auto
    Direction in which the text is rendered.
    • Read capabilities: UI
  • TextLabel.TextFits: boolean = false
    A boolean representation of whether the label's text fits within the size of it.
    • Read only
    • Read capabilities: UI
  • TextLabel.TextScaled: boolean = false
    Changes whether text is resized to fit within the TextLabel.
    • Read capabilities: UI
  • TextLabel.TextSize: number = 8
    Determines the line height of text in offsets.
    • Read capabilities: UI
  • TextLabel.TextStrokeColor3: Color3 = Color3.new(0, 0, 0)
    Determines the color of the text stroke (outline).
    • Read capabilities: UI
  • TextLabel.TextStrokeTransparency: number = 1
    Determines the transparency of the text stroke (outline).
    • Read capabilities: UI
  • TextLabel.TextTransparency: number = 0
    Determines the transparency of rendered text.
    • Read capabilities: UI
  • TextLabel.TextTruncate: Enum.TextTruncate = Enum.TextTruncate.None
    Controls the truncation of the text displayed in the TextLabel.
    • Read capabilities: UI
  • TextLabel.TextWrapped: boolean = false
    Determines if text wraps to multiple lines within the TextLabel
    • Read capabilities: UI
  • Determines the horizontal alignment of rendered text.
    • Read capabilities: UI
  • Determines the vertical alignment of rendered text.
    • Read capabilities: UI
  • TextLabel.FontSize: Enum.FontSize = Enum.FontSize.Size8
    Deprecated: This property is deprecated in favor of TextSize which is an integer and not an enum and thus offers far more options for sizes.
    Determines the font size to be used.
    • Deprecated
    • Not replicated
    • Read capabilities: UI
    • Load only

    Use TextSize instead.

  • TextLabel.TextColor: BrickColor
    Deprecated: This item has been superseded by TextLabel.TextColor3 which should be used in all new work.
    Determines the color of text.
    • Deprecated
    • Hidden
    • Not replicated
    • Read capabilities: UI
    • Load only
  • TextLabel.TextWrap: boolean = false
    Deprecated: This property is simply an alias for TextWrapped. Use the past-tense version instead.
    Determines whether or not text should wrap at the edges of the TextLabel element's space.
    • Deprecated
    • Not replicated
    • Read capabilities: UI
    • Load only

    Use TextWrapped instead.

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Inherited fromGuiObject6
Defined byTextLabel1
  • TextLabel:SetTextFromInput(text: string)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    text: string

Events29

Inherited fromObject1
Inherited fromInstance9
Inherited fromGuiBase2d1
Inherited fromGuiObject18