Infinite Yield Possible

I am getting an Infinite Yield Error on my tools when I reset. The line that’s getting the error is

if Humanoid.RigType == Enum.HumanoidRigType.R6 then
	LeftShoulder = Torso:WaitForChild("Left Shoulder") <-----this line and possibly the lines down
	RightShoulder = Torso:WaitForChild("Right Shoulder")
	OriginalLeftC0 = LeftShoulder.C0
	OriginalRightC0 = RightShoulder.C0
else
	Waist = Torso:WaitForChild("Waist")
	OriginalWaistC0 = Waist.C0
end

It breaks the tool/gun completely after dying.

Infinite yield possible is a warning that appears if an object with that name doesn’t exist after WaitForChild waits for at least 5 seconds.

I’m pretty sure that the motor6d returns before 5 seconds after death. I tried it and it still gives the error.

Hey, wait. Is the BreakJointsOnDeath property of the humanoid set to true? If it is, then that’s why it’s happening. When it’s on, it will automatically delete all joints inside the model.

Oh, yeah that was the problem. I never thought about that. Thanks!

Also, This may be something to do on my end but my roblox crashes whenever I reset.