Hi there. I’m curious as I want to have a text label in front of a door, but when I just make that label to the position of an invisible part it is very glitchy.
Here is an example of what I’m thinking of.
The only solution I know to achieve this like stated before is make the label a position of a part, but that’s really laggy and not very efficient. So what would be the best way to achieve this?
You can use a billboard gui. Billboard guis display “guis” in a 3d space while facing the player. You can adornee them to a certain object/part such as a door, invis part, etc.
To make it appear when the player gets close to it, you can use magnitude and “insert”/adornee the billboard gui to the part to make it appear. Do the functions as you would by checking the magnitude of the player relative to the invis part.
You can customize the billboard gui as a normal gui though it’ll be shown in a 3d space. To make sure it is shown infront of every single object as to not block it, you can set its z-index (correct me if Im wrong though, forgot what it actually was), (Was wrong, its the AlwaysOnTop Property) to make sure its infront of a part at all times or you can do the complete opposite to prevent players from clipping through walls to see the prompt.
Do you mean its still large as you get further away keeping its size? If you don’t want it to do that, change the scaling of the ui by well, using Scale instead of offset for example:
{50, 0}{50, 0} – Offset (What you dont want)
{0, 0.1}{0, 0.05} – Scale (What you want)
It would be great if there was some sort of way to fire an event when the billboard gui comes into range (and when it disappears) to avoid a manual magnitude check.
Billboard guis do actually kinda do that by themselves (if you configure it correctly).
Getting far away from the configured billboard gui makes it disspear depending on the amount of studs you placed in and vice versa.
I’d just feel as though magnitude is similar to the way the billboard guis works as well.
Yep, but I meant that it would be great if an event could fire when the billboard appears or disappears. That way we won’t need to needlessly run a magnitude check in a loop.