Im currently facing an issue with a program I am making, where I need to place a GuiObject at a certain position, the problem is that the parent effects this position, so is there any way to make the GuiObject be at an absolute position instead of it being relative to its parent?
AbsolutePosition is a property; use it with the Offset positional way and there you go!
AbsolutePosition is read only though
Yes, you read it, then set your desired UI using UDim2.fromOffset
Ok thats not what I need though, I need to set the AbsolutePosition of the GuiObject to a certain position, if I just set the position to the AbsolutePosition it wont work, again, cause GuiObjects position are relative too their parents
Oh, right, my bad, forgot about that.
You should be able to fix it using this way:
- Have your AbsolutePosition as a Vector2 or whatever that can store X and Y,
- You set the “ChildFrame” using `UDim2.fromOffset(AbsPos.X - ParentFrame.AbsolutePosition, AbsPos.Y - ParentFrame.AbsolutePosition.Y)
Where ParentFrame is the… parent of the ChildFrame. Makes sense?
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.