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

What is the meaning of "Infinite yield possible"?

Please help, i dont know what this means.. :/

1 answer

✓ Accepted answer

'An infinite yield is possible' is a warning that warns you that a script might wait infinitely for an instance that has either been not created or parented somewhere else.

This will happen if WaitForChild exceeds 5 seconds, without the timeOut parameter specified, and hasn't returned anything.

You can stop this by using WaitForChild's timeOut parameter, which will terminate the yield and return nil when its time has been exceeded.

-- Example

local p = script.Parent:WaitForChild('AnInstance, 10) -- This will try to find 'AnInstance' in the script's parent. If it couldn't find it after 10 seconds has been exceeded, waitForChild will terminate the yield and return nil

1 comment

0

alright, got it chexyalani thanks for the help! :D

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