I want to be able to make a gui point towards a udim2 position,
but all the info on how to rotate a gui towards a point has been using vector2
then I tried to find how to convert Udim2 into a vector2 but the way that worked was by multplying the screen size (or gui parent size) by the scale and doin nothing with the offset but that cant work becuse I`m doing this math on the server where the screen size is always 1,1
UDim2 position is 2 dimensional. If you need to change the orientation of GuiObject’s then simply modify the “Rotation” property of the desired Gui elements. It works in degrees, so 0/360 for default, 180 for upside down etc.
Couldn’t you use .AbsolutePosition and .AbsoluteSize? If not I think you could something like this:
local function toVector2(udim2, parentAbsSize)
local x = udim2.X.Scale*parentAbsSize.X + udim2.X.Offset
local y = udim2.Y.Scale*parentAbsSize.Y + udim2.Y.Offset
return Vector2.new(x, y)
end