My code is as follows, in a gui (the parent tree is correct) it is in a normal script also
local plr = script.Parent.Parent.Parent local char = plr:WaitForChild("Character") local hum = char.Humanoid hum.DisplayDistanceType = "None"
I do not know why this does not work at all...
Your problem isn't line 5 where you are setting the DisplayDistanceType, it's on line 2, you will always be waiting for Character. To properly wait for the character you can use this method:
local plr = game.Players.LocalPlayer plr.CharacterAdded:wait() local character = plr
Now your updated code
local plr = script.Parent.Parent.Parent plr.CharacterAdded:wait() --this waits until the event is fired local char = plr.Character local hum = char.Humanoid hum.DisplayDistanceType = "None"