How would i make a script where the closer you are too something then a gui on your screen will get more visible

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

  1. What do you want to achieve? Keep it simple and clear!
    how would i make a script where the closer you are too something then a gui on your screen will get more visible

I’m sure this will help you with your problem. .Magnitude is a distance check.

The link goes a little deeper into it.

function DistanceTransparency()
   gui.Transparency =  1 - ((plr.Character.HumanoidRootPart.Position - part.Position).Magnitude / — Put max distance for transparency effect to start taking place here)
end