There's a very odd thing going on in my game right now.
Whenever I use WaitForChild()
it produces this error:
Infinite yield possible in [Location]:WaitForChild([Thing])
but I replace the WaitForChild() with this line of code:
repeat wait() until [Location]:FindFirstChild([Thing])
and it suddenly works. Shouldn't WaitForChild() do the exact thing my workaround is doing? Why is it making this error?
WaitForChild
, and that the script will yield indefinitely until the child is found. This can cause scripts to break (it has happened to me before). However, this wont be a problem unless it waits too long for an object. Hope I cleared things up.