Collapse Sidebar




AbsolutePosition is a read-only property that provides the screen position of a UI element in pixels. This represents the actual pixel position at which an element renders as a result of its ancestors’ sizes and positions. The GuiObject/AnchorPoint also influences the AbsolutePosition. This property, GuiBase2d/AbsoluteSize and GuiBase2d/AbsoluteRotation are a group of properties that all describe the final rendered orientation of a UI element.

For example, on a 1920 by 1080 screen, a Frame with position {0.5, 0}, {0.5, 0} would have an AbsolutePosition of (960, 540). If you were to place another Frame with position {0, 50}, {0, 50} inside that one, its AbsolutePosition would be (1010, 590). This example assumes each Frame has the defualt GuiObject/AnchorPoint of (0, 0), the top left corner.

Code Samples

Copycat Frame

This code sample shows how a UI element’s size, position and rotation can be copied without parenting a “copycat” to the original. It uses the Absolute-family of properties to orient a “copycat” Frame that covers on the screen space that the original does.