I was making an obby, and I had this script inside of a part:
script.Parent.Touched:Connect(function(hit)
if hit.Parent:WaitForChild('Humanoid') then
hit.Parent:WaitForChild('Humanoid'):TakeDamage(101)
end
end)
However, upon placing multiple parts like these, it prints this in the output:
*Infinite Yield possible on line 3*
Well, something like that.
I have no clue what on earth this 'Yield' is, so can anyone help me, please?

4 comments
Infinite yield is a warning saying that WaitForChild() can wait forever for the child to exist because the child doesn't exist. WaitForChild() has a second parameter that tells it how many seconds to wait, so use that.
I did, but it still prints that.
That means the child doesn't exist. Using a second WaitForChild() would be irrelevant anyway because it would have found the humanoid by line 2, which means you can just index it.
WaitForChild will always return a truthy value unless you use its second parameter so there's no point in checking if it's truthy.