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() |
7 | end ) |
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."
Do this instead:
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | plr.CharacterAdded:Wait() - wait for character to be added in |
3 | plr.Humanoid.DisplayDistanceType = "None" -- ain't nobody viewing le display!!1! mwahwaha |
4 | wait( 5 ) |
5 | script.Parent:Destroy() |
Your real problem was
1 | script.Parent.Script:Destroy() -- the second "Script" is useless |
2 | --[[ INSTEAD DO --]] |
3 | script.Parent:Destroy() |
4 | -- or |
5 | script:Destroy() |
Also... why exactly is this in a tool?
make sure to put this is startercharacterscripts
1 | local player = game.Players.LocalPlayer |
2 | local playerpart = game.Workspace:WaitForChild(player.Name) |
3 | local human = playerpart.Humanoid |
4 |
5 | human.NameDisplayDistance = 0 |
6 | human.HealthDisplayDistance = 0 |
Final script:
1 | script.Parent.Humanoid.DisplayDistanceType = "None" |
2 | wait( 10 ) |
3 | script:Destroy() |