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

Name Hide script is not working correct?

Asked by 7 years ago
Edited 7 years ago
1> game.Players.PlayerAdded:connect(function(plr)
2    wait()
3    plr.Humanoid.NameDisplayDistance = 0
4    plr.Humanoid.HealthDisplayDistance = 0
5    wait(5)
6    script.Parent.Script:Destroy()
7end)

In starterpack, the only output is I get is "Something unexpectedly tried to set the parent of to NULL while trying to set the parent of . Current parent is Backpack."

3 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Do this instead:

1game.Players.PlayerAdded:connect(function(plr)
2plr.CharacterAdded:Wait() - wait for character to be added in
3plr.Humanoid.DisplayDistanceType = "None" -- ain't nobody viewing le display!!1! mwahwaha
4wait(5)
5script.Parent:Destroy()

Your real problem was

1script.Parent.Script:Destroy() -- the second "Script" is useless
2--[[ INSTEAD DO --]]
3script.Parent:Destroy()
4-- or
5script:Destroy()

Also... why exactly is this in a tool?

0
It's not in a tool, Just a script in a starter pack, I just like to keep script that are for players but need to be deleted after in starter pack, just cause. Twenty1chickens 4 — 7y
0
This did not work. Twenty1chickens 4 — 7y
Ad
Log in to vote
0
Answered by
Plieax 66
6 years ago

make sure to put this is startercharacterscripts

1local player = game.Players.LocalPlayer
2local playerpart = game.Workspace:WaitForChild(player.Name)
3local human = playerpart.Humanoid
4 
5human.NameDisplayDistance = 0
6human.HealthDisplayDistance = 0
Log in to vote
0
Answered by 6 years ago

Final script:

1script.Parent.Humanoid.DisplayDistanceType = "None"
2wait(10)
3script:Destroy()

Answer this question