Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you convert a UDim2 Position to an AbsolutePosition? If so, how?

Is there a way to do this without creating a gui object, positioning it at Position, and reading its AbsolutePosition?

Thanks.

1 comment

0

it would depend on the parent size

2 answers

✓ Accepted answer

###You could do something like this, we are getting the Offset and Scale

AbsolutePosition = Vector2.new(GUI.Position.X.Scale, GUI.Position.Y.Scale)
GUIObject.Position = UDim2.new(0, GUIObject.AbsolutePosition.X, 0, GUIObject.AbsolutePosition.Y)

If I understand what you're saying then that should work

4 comments

0

Meant a way to go from Position to AbsolutePosition without the use of guiobjects. Found a workaround to the particular problem I had that doesn't require doing this, but thanks anyway.

0

Oh ok. Still don't understand what you meant but ¯_(?)_/¯

0

You did it in reverse order. OP wants to make UDim2 an AbsolutePosition.

0

oh

This discussion is preserved as it was. New answers, comments, and votes are closed.