Making BillboardGui go only on top of SOME parts?

How can I make a BillboardGui go only on top of some parts?
Currently, I have an RP Name BillboardGui, but it clips into the morph, making it hard to see at some angles.

How can I make the RP Name display on top of the morph, but not on top of walls and other objects?

Well, not sure if this would be the best way, but its one method at least.

Basically it involves raycasting to determine if the object that has the BillboardGui is behind a wall or not. If it is, set the ShowOnTop to false, otherwise set it to true. This can be a bit expensive as you will need to contantly raycast to everything that has this BillboardGui from the player’s camera, not the player’s HRP.

As for showing the player’s own BillboardGui, you would need to check the cameras position as well as its line of sight to determine if you need to hide the player’s own billboard gui, but making sure to whitelist the player’s character parts so it doesnt make it think the player is a wall.

Might not be the best solution, its just a thought. Hope it helps some :smile:

1 Like