Hello, I have an issue; When converting a UDim2 data type to Vector2 data type, my method is to capture the .Scale from both X and Y values from the UDim2 and then put those in the Vector2 - but this seems to not work as the positions are totally different. How should I go about converting these data types?
Instead of using Position
, why not use AbsolutePosition
instead?:
AbsolutePosition
is already a Vector2
.
This module I’m using requires me to use Vector2’s and I’m not sure why
If you are converting a scale, then you would multiply the scale by the viewport size of the camera so you get the pixels. I don’t know what the context is so Its hard to help.
function v2(v)
local x = v.X
local y = v.Y
return Vector2.new(x,y)
end```
1 Like