How to convert a Vector2 to a Udim2

How would I convert these two data types

UDim2.new(oldVector2.x, 0, oldVector2.y, 0)

or

UDim2.new(0, oldVector2.x, 0, oldVector2.y)

depending on if you want to use pixels or scale

Yes, you can use fromOffset() or fromScale()

UDim2.fromOffset(someVector2.X, someVector2.Y)
UDim2.fromScale(someVector2.X, someVector2.Y)

Read this article It will help you: