So I am trying to make a draggable GUI (meaning players can move it around the screen) and when they click the close button, I want it to tween upwards off the screen, I do that with this code:
local position = UDim2.new(0, script.Parent.Parent.Position.X.Offset, -0.8, 0)
This part here:
script.Parent.Parent.Position.X.Offset gets the X position of the main GUI, because I want it to tween it straight up, so I can’t just manually set the X position because then it will fly diagonally if the player moves it all the way to the left of the screen for example.
That is the problem though, regardless of where I move it on the screen, it still flies in the wrong direction, initially I thought the issue was because I was using scale and the draggable property uses offset, but the problem still occurs.