Convert a UDIM2 to AbsolutePosition (Vector2) without Object

Pretty straight forward question, just not entirely sure how to reach a solution.

I have two Udim2 values that I need to compare the distance of, to do this I need the absolute positions of both, no actual instance is created, only the Udim2 values.

Any idea how to convert these?

Hm…finding out a value like that would be pretty difficult without any sort of object.

Initially, I was going to suggest just using the AbsolutePosition property of UI objects, but you mentioned that you only have 2 UDim2 values.

One possible solution is to take the offset, and find the distance of the scale by multiplying Camera.ViewportSize by the scale. Not sure if that would work, but it’s worth a try. Good luck!

2 Likes