Character Name/Health Display
Character Name/Health Display
The Humanoid instance is used to create character models, both for players and NPCs. When inserted into a Model that has a Head part, Roblox will display its name and/or health bar.
Display Distance Type
The character’s name and health can be configured through the Humanoid/DisplayDistanceType property.
Humanoid/DisplayDistanceType is set to Viewer, the player will see the name/health of other characters within their own character's Humanoid/NameDisplayDistance and Humanoid/HealthDisplayDistance, regardless of those value settings for the other characters.
Humanoid/DisplayDistanceType is set to Subject, it takes full control over its own name/health display through its Humanoid/NameDisplayDistance and Humanoid/HealthDisplayDistance values. Thus, player characters will only see character information within those distances set on the subject.Humanoid/NameDisplayDistance ranges are indicated by the circles. Only the name Octavia is seen by the player whose character is standing inside her range but outside the Watchman range.
Humanoid/DisplayDistanceType is set to None, its name and health bar will not be displayed under any circumstances.Name Occlusion
Occlusion (hiding) of humanoid names behind walls or other objects is controlled by the player character’s Humanoid/NameOcclusion property.
Humanoid/NameOcclusion is set to NoOcclusion, names and health bars will never be occluded for humanoids hidden behind non-transparent objects.
Humanoid/NameOcclusion is set to OccludeAll, names and health bars will always be occluded for humanoids hidden behind non-transparent objects.
Humanoid/NameOcclusion is set to EnemyOcclusion, names and health bars will be occluded for enemies (players on a different Player/Team|Team) hidden behind non-transparent objects, but names/health of teammates will not be occluded.Player/Team|Team, their character's name appears in the same color as the team's Team/TeamColor|TeamColor. This helps identify teammates and opposing players in team-based experiences.
Health Display Type
A character’s health bar visibility can be further controlled through its Humanoid/HealthDisplayType property.
Humanoid/HealthDisplayType is set to AlwaysOn, its health bar will always appear.
Humanoid/HealthDisplayType is set to DisplayWhenDamaged, its health bar will only appear when its current Humanoid/Health|Health is less than its Humanoid/MaxHealth|MaxHealth.
Humanoid/HealthDisplayType is set to AlwaysOff, its health bar will never appear under any circumstances.Display Name
By default, a character’s display name will match the name of its character Model, but it can be overridden through the Humanoid/DisplayName property. The value can be set directly on an NPC humanoid in Studio, but player characters should be handled as follows:
- From a
LocalScript, fire aarticles/Remote Functions and Events|remote eventto request changing that player’s display name on the server. This functionality can be connected to aTextBoxname entry or whatever suits the experience’s interface.
- In a server-side
Script, listen for the remote event and usearticles/Text and Chat Filtering|text filteringto assign the requested name to the player character’s humanoid.