So basically sometimes you get an error says invinite yield possible on "path"
well the path is correct and it code sometimes even work along with it but it gives this errors sometimes the path is correct but the code doesn’t work how can I prevent this errors can someone learn me
Check the name of the instance you’re waiting on and see if it’s the same in your :WaitForChild()? I remember I got an infinite yield possible because I was referring to an instance by the name I gave them as a variable, not their actual name property
The output prints infinite yield possible when it is waiting for an object that you wanted to load in using :WaitForChild() for too long. eg local toy = workspace:WaitForChild('Zebra') -- Script will yield here until zebra loads in
. The game is just saying ‘Hey, the thing you are asking me to wait for may not even exist, go check if its there’. As for preventing it, the one thing that you can do if make sure the item you’re waiting for exists before you run the game.