I am trying to make a script that shows the distance between the middle of two guis
here is my script:
local function Distance(Gui1, Gui2)
local X =Gui1.AbsolutePosition.X - Gui2.AbsolutePosition.X
local Y = Gui1.AbsolutePosition.Y - Gui2.AbsolutePosition.Y
local dis = math.sqrt(2^X + 2^Y)
return dis
end
does it find the distance from the center???because the results is not constant
eg) when i put frame 1 on top of frame to, the distance is 20 .But when I put frame 1 below frame 2, the result is 40