- I am making a combat system with a blocking mechanism but I keep getting this warning the isBroken is a BoolValue in the same folder as the blocking script inside of the starter pack
-
What is the issue?
Error: Infinite yield possible on ‘Players.TheYusufGamer.Backpack.CombatSystem:WaitForChild(“IsBroken”)’ - Studio
local isBroken = script.Parent:WaitForChild("isBroken")
I have looked on the Forum how to fix this but the error still pops up
3 Likes
That error is caused when the yield WaitForChild()
creates, goes longer than 5 seconds. This could happen because of loading.
This won’t really cause any issues. Only if the instance, really wasn’t being found. But, there, it will be found, so there’s nothing to worry.
1 Like
When I test I won’t even let me use my combat
Maybe the issue is not with that, but with your own code. Otherwise, I want you to do a check. Go to studio, and run the game, after that, go over to Player, BackPack, ‘CombatSystem’ and look for ‘isBroken’. If it’s not there, there really is something wrong, otherwise, it’s your own code.
The IsBroken is in my starter pack when I tested
Is this the exact error copied and pasted?
Error: Infinite yield possible on ‘Players.TheYusufGamer.Backpack.CombatSystem:WaitForChild(“IsBroken”)’ - Studio
If so, then it seems that it’s waiting for an instance called “IsBroken” with a capital i and not “isBroken”.
1 Like
They Both have Lowercase ‘i’ in the script and the boolvalue name
1 Like
Is the error copied and pasted or did you type it out? If you copied and pasted, check if you’re using WaitForChild
in another line via CTRL+F and check if you’ve misspelled it there. On a side note: you do not need to wait for the same instance later in the script.
2 Likes
Sorry about that I am guessing I Forgot to Capatilise It works fine now thanks for your help.