How do I make teammate names display farther?

What I wanted to do was make the teammates names show up farther, but I don’t know how to do that since I’m not very skilled with coding.

The quality might be very bad on the clip because of my PC. If it is, my bad.
robloxapp-20230108-1519038.wmv (1.5 MB)

I tried looking for solutions on the Developer Hub, but many don’t have a solution or I don’t understand it.

function onRespawn(character)
character.Humanoid.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
end 

local function onPlayerEntered(newPlayer)
  newPlayer.CharacterAdded:connect(onRespawn)
end 
game.Players.PlayerAdded:connect(onPlayerEntered)

It would be great if anyone could help me with this. Thanks!

You can do this in your local script:
repeat
wait()
for _,v in pairs(game.Teams.Team1:GetPlayers()) do
v.NameOcclusion = Enum.NameOcclusion.None
end
until game.Players.LocalPlayer == nil

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.