Any better methods then using chr:WaitForChild?
Asked by
5 years ago Edited 5 years ago
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.
01 | local plr = game:GetService( "Players" ).LocalPlayer |
04 | until plr.Character and plr.Character.Humanoid |
05 | local chr = plr.Character |
06 | local human = chr.Humanoid |
07 | local hrp = chr.HumanoidRootPart |
09 | cam = workspace.CurrentCamera |
12 | local disabled = chr:WaitForChild( "Disabled" ) |