I was wondering if it were possible to make :WaitForChild() wait for a certain amount of time, and if it's still nil, it'll break like a loop would / stop.
✓ ANSWER ACCEPTED
Is there a way to make :WaitForChild() wait for a certain amount of time, then stop?
1 answer
✓ Accepted answer
ROBLOX has recently updated the function so that if :WaitForChild() exceeds five seconds without returning anything, then a warning will be printed out to the output.
You can set a certain amount of time to the function. The parameters for the function are string childName, double timeOut. The second parameter, timeOut, does default to 0 by the way.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
wait(1)