So, Whenever the player dies (not by reseting) the output shows "Infinite Yield Possible "Workspace.PlayerNameHere.WaitForChild("Disabled") Basically saying that it will go for forever, Any other way other then using "chr:WaitForChild"? That is better and that so this error doesnt show up? Or how to fix this issue? Also, Whenever the player dies again, another one shows up. Basically saying: Infinite Yield Possible "Workspace.PlayerNameHere.WaitForChild("Disabled") again, then if the player dies again a third one pops up, etc etc.
local plr = game:GetService("Players").LocalPlayer repeat wait() until plr.Character and plr.Character.Humanoid local chr = plr.Character local human = chr.Humanoid local hrp = chr.HumanoidRootPart mouse = plr:GetMouse() cam = workspace.CurrentCamera local disabled = chr:WaitForChild("Disabled")
Yeah, you should use Player.CharacterAdded event to catch the Character again and reset variable references to the new character. You can also reset local scripts on respawn.
LocalPlayer.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") -- etc end)