Is there any way to calculate gui distance?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I wan’t to check the distance between 2 guis.

  2. What is the issue? I don’t know how to create the line of code.

  3. What solutions have you tried so far? I looked everywhere on the devforum, and attempted to use magnitude method.

Have you tried calculating the difference between AbsolutePosition of gui A and AbsolutePosition of gui B?

I have, but I don’t know how to actually mathematically calculate the distance.

(Frame.AbsolutePosition - Frame2.AbsolutePosition).Magnitude

GuiDistance.rbxl (23.3 KB)