Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What is WaitForChild()?

What is the purpose for WaitForChild? It Confuses me. Can You provide an example of how you would use it in a game?

1 answer

✓ Accepted answer

All it does, is wait for the given title in the parentheses , example.

workspace.Model:WaitForChild("MainPart")

it continues to progress through the code syntax, when the child is found. If the child either is nil or not found then the progression of the code comes to a stop.

2 comments

0

So is it like a function? or Like an EventListener?

0

It's actually a Method. A function attached to an object.

This discussion is preserved as it was. New answers, comments, and votes are closed.