I have a simple example of a GUI, the layout is as follows:
- ScreenGui - Frame - UIListLayout - SubFrame1 - SubFrame2 - SubFrame3
The position of each SubFrame
is locked by the UIListLayout
, so the .Position
property will always be a Vector3
of (0, 0, 0, 0)
.
I want to create a new frame based on the relative position of the SubFrame
(inserting children into the SubFrame
is not an option).
Is there a way of getting the position of say, SubFrame3
?
You could retrieve this by doing SubFrame3.AbsolutePosition
. Remember that this will give you a Vector2 with X, Y
values in screen offset.
You could convert this to scale measurements (based on the parent frame size) by doing SubFrame3.AbsolutePosition.X/Frame.AbsoluteSize.X
.