1 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

NameOcclusion

NameOcclusion controls whether overhead name labels on Humanoid characters are hidden when solid geometry blocks the line of sight between the viewer and the character. When the local player's Humanoid.NameOcclusion is set to EnemyOcclusion or OccludeAll, the engine performs a raycast; if the character's head is behind a solid part, the name label is not rendered for that frame. Setting the value to NoOcclusion skips the raycast entirely and names are always visible regardless of intervening geometry.

Items

NameValueDescription
NoOcclusion0Do not occlude (hide) any humanoid names.
EnemyOcclusion1Occlude (hide) all enemy humanoid names.
OccludeAll2Occlude (hide) all humanoid names.

NoOcclusion

Do not occlude (hide) any humanoid names.

FieldValue
value0

EnemyOcclusion

Occlude (hide) all enemy humanoid names.

FieldValue
value1

OccludeAll

Occlude (hide) all humanoid names.

FieldValue
value2