Nametag showing past walls

Hi, how do I make it so that the name tag is not seen past walls? I am trying to make it so that players can hide and nametags are kinda making it hard.

I also don’t know if this is a coding thing or a UI thing. The nametag is all under a billboard attached to the head.

If you have AlwaysOnTop set to true then it will always render over the world.