We use cookies on this site to enhance your user experience

A TextButton behaves similarly to TextLabel in regards to rendering with the additional behaviors of a GuiButton. It defines the same text-rendering properties as a TextLabel does.

You can disable text rendering by setting TextButton/TextTransparency to 1. This will leave you with a plain rectangle that can be used as a button.

Properties

Name Type Description
Font

Determines the font used to render text.

float

Scales the spacing between lines of text in the TextButton.

string

Sets whether a TextButton should be GuiBase2d/Localize or not.

string

Determines the string rendered by the UI element.

Vector2

The pixel size of a UI element’s text.

Color3

Determines the color of rendered text.

bool

A boolean representation of whether the TextButton’s text fits within the size of it.

bool

Changes whether text is resized to fit within the TextButton.

float

Determine the line height of text in pixels.

Color3

Determines the color of the text stroke (outline).

float

Determines the transparency of the text stroke (outline).

float

Determines the transparency of rendered text.

TextTruncate

Controls the truncation of the text displayed in this TextButton.

bool

Determines if text wraps to multiple lines within the UI element space, truncating excess text.

TextXAlignment

Determines the horizontal alignment of rendered text.

TextYAlignment

Determines the vertical alignment of rendered text.

Inherited from Instance , GuiBase , GuiBase2d , GuiObject , GuiButton

Archivable ClassName DataCost Name Parent RobloxLocked AbsolutePosition AbsoluteRotation AbsoluteSize AutoLocalize RootLocalizationTable Active AnchorPoint BackgroundColor3 BackgroundTransparency BorderColor3 BorderSizePixel ClipsDescendants LayoutOrder NextSelectionDown NextSelectionLeft NextSelectionRight NextSelectionUp Position Rotation Selectable SelectionImageObject Size SizeConstraint Transparency Visible ZIndex AutoButtonColor Modal Selected Style