Controls whether a
Humanoid|Humanoid's name can be seen behind walls or other objects.
This property is a
Enum/NameOcclusion value and can be configured to occlude all names, enemies names only or disable occlusion entirely.
How does NameOcclusion work?
This property applies based on the viewing
Humanoid. If the viewing
Humanoid NameOcclusion property is set to OccludeAll, all
Humanoid name tags will be occluded for that
NameOcclusion when there is no local Humanoid
In cases where the
Players/LocalPlayer has no
Humanoid associated with it. This property will instead apply for the subject
Humanoid. This means in such cases, a
Humanoid/NameOcclusion property determines the occlusion of that
Humanoid|Humanoid's name for the
Occlude Player Names
In the below example,
Player|Players will not be able to see each other’s
Player/Character names when they are obscured behind
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").NameOcclusion = Enum.NameOcclusion.OccludeAll end) end)