I have a script to change the settings of the Health/Name display of a character.
I tested it with two people, but it didn't work.
Here is the script:
HealthShown = false
NameShown = true
function name(plr)
if NameShown == true then
plr.NameDisplayDistance = 100
if NameShown == false then
plr.NameDisplayDistance = 0
end
end
end
game.Players.PlayerAdded:connect(name)
function health(player)
if HealthShown == true then
player.HealthDisplayDistance = 100
if HealthShown == false then
player.HealthDisplayDistance = 0
end
end
end
game.Players.PlayerAdded:connect(health)
What makes this not work?

1 comment
I updated my answer. The problem was that it was not a local script.