Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does WaitForChild() ever break after X amount of time?

Asked by
lomo0987 250 Moderation Voter
9 years ago
WaitForChild() -- Does this break after X amount of time? 

brick = WaitForChild(game.Workspace.Brick) -- Would this ever break or would it sit there and wait for something that's named Brick to show up in the Workspace?
1
This isn't how you use the WaitForChild method -- though. `brick = game.Workspace:WaitForChild("Brick")` BlueTaslem 18071 — 9y
0
I'm sure you could do that though, right? I wouldn't see why it wouldn't work like that :D lomo0987 250 — 9y

1 answer

Log in to vote
1
Answered by
Thetacah 712 Moderation Voter
9 years ago

Howdy!

WaitForChild waits for the object just until it's found. It will not break if it's not found; it will continue waiting.

Have a good day!

Ad

Answer this question