Start building

How to Fix "Infinite yield possible on WaitForChild" in Roblox Studio

Roblox Studio OutputRuntime Error
Infinite yield possible on 'Workspace:WaitForChild("...")'
30-Second Fix

Why it happens & how to fix it

WaitForChild waited 5+ seconds and never found an instance with that exact name. Check spelling/capitalization, verify the object is in the right container (not ServerStorage for a LocalScript!), and pass a timeout argument like `WaitForChild('Name', 10)`.

Broken codeCauses error
-- LocalScript (BROKEN — wrong casing or wrong container)
local stats = player:WaitForChild("Leaderstats") -- real name is "leaderstats"
Working fixSafe Luau
-- LocalScript (FIXED — exact casing + timeout guard)
local stats = player:WaitForChild("leaderstats", 10)
if not stats then
	warn("leaderstats did not load in time")
	return
end

Root cause & debugging checklist

Three things cause this warning: (1) a spelling or case mismatch (`'leaderstats'` vs `'Leaderstats'`), (2) a LocalScript waiting on something hidden inside `ServerStorage` or `ServerScriptService`, or (3) `Workspace.StreamingEnabled` hasn't streamed a distant part to the client yet.

  • Verify exact spelling and UPPER/lowercase in Roblox Explorer.
  • Remember LocalScripts CANNOT see ServerStorage or ServerScriptService — move shared assets to ReplicatedStorage.
  • Pass a timeout (`WaitForChild('Item', 5)`) when an object is optional.

Common questions.

Does Infinite yield possible break my script?

Yes — any line of code AFTER the stuck WaitForChild will never run until that object appears.

More Roblox error fixes.

All 12 error guides

Revix reads Studio Output
and fixes bugs automatically.

Start building free

Free to start. No card needed.