For the complete documentation index, see llms.txt. This page is also available as Markdown.

GuiBase2d

GuiBase2d : Instance

Overview

This is an abstract class inherited by 2D GuiObjects

Properties

AbsolutePosition

Vector2

This property specifies the pixel-based screen position where a UI element is rendered.

This value reflects the final computed position, accounting for the positions and sizes of parent UI elements, and is always relative to the element’s top-left corner.

Code Samples

local ScreenGui = script.Parent
local TextLabel = ScreenGui.TextLabel

print("AbsolutePosition : ", TextLabel.AbsolutePosition)

AbsoluteSize

Vector2

This property represents the pixel-based size of a UI element as rendered on the screen.

This value incorporates the parent’s size, AnchorPoint, and Scale settings, accurately reflecting the final on-screen size of the element.

Code Samples

AutoLocalize

boolean

Determines whether automatic localization (Auto Translation) is applied to this GuiBase2d and its descendants. If AutoLocalize is true, the object is also included in Automatic Text Collection (ATC).

The default value is true. If set to false, automatic translation is disabled for the object and its entire child hierarchy.

The inheritance rules are as follows:

  • If a child's AutoLocalize is false, translation is not applied to that object.

  • If a parent's AutoLocalize is false, translation is not applied regardless of the child’s value.

  • If a child's AutoLocalize is true, it follows the parent’s AutoLocalize setting.

Code Samples

Methods

Events

Last updated