Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a person's nametag invisible?(unanswered)

Asked by
wjs3456 90
9 years ago

I would like to have use a script making the nametags/health on all the people on the blue team not visible. Here is the script I used.

for i,v in pairs(game.Players:GetPlayers()) do
    if v.TeamColor == BrickColor.new("Bright blue") then    
        v.HealthDisplayDistance = 0
            v.NameDisplayDistance = 0
    end
end

Thanks

1 answer

Log in to vote
0
Answered by 9 years ago

Oops. Try this:

for i,v in pairs(game.Players:GetPlayers()) do
    if v.TeamColor ~= BrickColor.new("Bright blue") then    
        v.Character:WaitForChild("Humanoid").NameOcclusion = Enum.NameOcclusion.EnemyOcclusion

    end
end

This Will only work if there are only two teams. This code should Hide the names of anyone who is on the Bright blue Team.

Ad

Answer this question