Minimum Distance for Billboard GUI

How would I be able to add a minimum view distance for a BillboardGUI where if you get close to it, then it dissapears, like how it does with MaxDistance?


I think it can be done with local script(for this script, you would need to add invisible part as parent of gui);

local player = game.Players.LocalPlayer
while wait(0.2) do
 if player.Character then
  if player:DistanceFromCharacter(workspace.ParentOfBillboardGui) < 10 then --I don't know if DistanceFromCharacter function requies .Position, or just name of part, so if it not works then add .Position
      workspace.ParentOfBillboardGui.BillboardGui.Enabled = false
      workspace.ParentOfBillboardGui.BillboardGui.Enabled = true

--Put me in StarterPlayerScripts!


You’r in the wrong topic, you should moov to #help-and-feedback:scripting-support (You will probably also get more answer).

Have a good day.

But this is about a GUI. So I assumed it has to do with Art Support as it is a GUI.

No because it’s a script… Check the rules pin in Art Design Support.

1 Like

Well, sorry about that. I’m new to the Roblox Dev Forum. In the future I will use the Scripting Support.

1 Like