Anyway to move a element to an AbsolutePosition?

Now I assume this isnt exactly possible with the default roblox studio, so I assume you’d have to use some methods for this.

So what I am trying to do is move a textlabel to another TextLabals AbsolutePosition, the problem with this is that the parent effects the position, so simply moving it there doesnt work. I could subtract the parents absolute position, but then its parent also might also be offsetting it, Point is, its complicated, so what can I do?

Should I just go through all its parents parents and subtract their absolute position or what? This has been stumping me so any help would be nice!

Why don’t you make use of the parent’s absolute position!

e.g.

local DestinationLabel = ...
local LabelToMove = ...

local Destination = DestinationLabel.AbsolutePosition
local ParentPosition = LabelToMove.Parent.AbsolutePosition

LabelToMove.Position = UDim2.fromOffset(Destination.X - ParentPosition.X, Destination.Y - ParentPosition.Y)

This would account for any parents of the parent as well

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.