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

Is it possible to do Object.Object2:WaitForChild("Object3") or do you need to do it in another way?

Im trying to load some stuff in my game before it runs my script but its throwing out a inf yield warning. Here is the script line its saying theres a inf yield at.

Plr.Backpack:WaitForChild("BankStuff")

I wont be able to respond with new info till the morning. Sorry.

1 answer

You are simply missing a time parameter, like this

Ex.1

Plr.Backpack:WaitForChild("BankStuff", 99)

This code will wait for 99 seconds, moving along the moment BankStuff is found before the time is up.

Ex.2

Plr.Backpack:WaitForChild("BankStuff", math.huge)

This waits for a practically infinite amount of time, moving along the moment BankStuff is found before the time is up. If it, for some reason, absolutely needs to wait forever use this instead.

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