After WaitForChild times out, then after the expected child is added, an attempt to call a nil value
error is thrown.
parent = Instance.new("BoolValue")
child = Instance.new("BoolValue")
child.Name = "Value"
parent:WaitForChild("Value", 0.1)
child.Parent = parent
--> attempt to call a nil value
After multiple timeouts, cannot resume non-suspended coroutine
errors are thrown.
parent = Instance.new("BoolValue")
child = Instance.new("BoolValue")
child.Name = "Value"
for i = 1, 10 do
parent:WaitForChild("Value", 0.1)
end
child.Parent = parent
--> attempt to call a nil value
--> cannot resume non-suspended coroutine (x9)