Normally billboard gui's are dependant on where exactly the camera is in relation to the parent of the gui. What I want to do is make it so the visibility of the gui dependant on how close the player is to an object. An example is the jailbreak cars and their system of using "e" to interact depending on how close the player is. What should I do?
use magnitude. if you're 100 studs away from the billboard, the text shows.
-- THIS IS A LOCAL SCRIPT local text = game.Workspace.BillBoard.SurfaceGui.TextLabel--finding the text local billboard = game.Workspace.BillBoard--finding the billboard while wait() do--while loop local mag = (billboard.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude --using magnitude to identify how far away you are from the billboard if mag <= 15 then-- if the magnitude is smaller or equal to 15 text.Visible = true -- if it is, the billboard is visible else text.Visible = false --otherwise, we make the text invisible end end