The DisplayDistanceyType is not even changing and I get no error at all, thanks for help.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) for i,v in pairs(char) do while wait() do v:WaitForChild("Humanoid").DisplayDistanceType = "None" end end end) end)
I don't know why you are looping through the character or having infinite loop inside? This would mean that only the 1st instance in the for loop will be checked then you wait for the child humanoid, but since v is a object inside of the character then it will not also have a child called humanoid.
I think that you need to go back and what you are trying to do with this code as there is no logical end.
If you only wanted to set the display distance type then use "char" as this is the players character model which will have a child humanoid.
Also I would highly recommend that you use "Enums" as they are managed by roblox meaning if there is an update then the state "None" could change but the enums would be updated.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None end) end)