Basing a Billboard Gui's Max Distance off the player's character instead of their camera

The Billboard Gui property ‘MaxDistance’ is really helpful as it means I don’t have to script my own function for this, however I am having one problem with it at the moment: The MaxDistance is based off the player’s camera, instead of their character, as the wiki states here:

I’m aiming to have a GUI appear when a player is a set distance from a door, but at the moment the MaxDistance property means the distance is based off the camera from the door, causing the following problem when you zoom in and out:

Is this easily changeable in the Billboard’s Guis properties, or do I have to script my own function for this? Also, if I do have to, what’s the best way to script this function to prevent lag (e.g. no while loops)



My mind was telling me a Heartbeat loop. But perhaps, detect when a user is moving.

Only when moving.

That’s a possibility, but I ideally want to avoid this as it is not very efficient

1 Like

They can’t change MaxDistance behaviour just like that because there may be games that rely on it being the distance from the camera. I also prefer it to be the distance from the camera myself.

For your use case, just have a loop that you run a small amount of times per second (i.e. wait(.25) interval) at which you update these billboards, so that you hide them when the character is too far away and show them again when the character comes close. Doing this manually will also allow you to attach any kind of UI animations or sound triggers that you want to these billboards appearing/disappearing.


Okay, thanks

1 Like