Basically, I want to get the Vector2 between two points. (2D space)
I already tried subtracting them but the system still gives me a UDim2 value
my current code:
local A = UDim2.fromOffset(Frame.Position.X.Offset, Frame.Position.Y.Offset - Frame.Size.Y.Offset/2)
local B = UDim2.fromOffset(Frame.Position.X.Offset, Frame.Position.Y.Offset + Frame.Size.Y.Offset/2)
print(typeof(B-A)) -- UDim2 value
There doesn’t seem to be a constructor or method to do that. If so you would need to use the vector2.new(x,y). And feed it the right x and y.
But it also seems for the vector that you are trying to calculate, you would know in advance what the vector would be. The X component would always be 0 since you are taking a value and subtracting the same value. For y you are taking 1/2 offset - - 1/2 offset. That would be the same as offset. (- - is the same as +. The two halves would be the same as one whole offset.)