Hi, I am trying to make a game similar to Tower of Hell, and I am having trouble scripting the script that generates the stages in the tower. When I run the script it says in the output “Infinite yield possible on 'Workspace.Storage.End:WaitForChild(“Center”)”.
Here is the script:
Yes, I’m trying to search for the part named “Center” inside the End Model.
And sorry I forgot to add this variable of the script in my post: local Storage = game.Workspace:WaitForChild(“Storage”)
Possibly you don’t have the center part inside the end model, although it would be easier to identify any plausible solutions if I could see the game explorer tab. It is more likely an issue from the location of the models/parts then a scripting error.
Again, I would have to see the game explorer tab, the problem doesn’t seem to be with the code. Generally an infinite yield error arises from a missing instance. But if you just simply want to avoid this error from showing completely you could do End.PrimaryPart = End:WaitForChild(“Center”, 5) and it would timeout after 5 seconds if it doesn’t find the instance instead of returning an error.
Well does it work properly in-game besides the error message displaying? If so I would try using End.PrimaryPart = End:WaitForChild(“Center”, 7) basically just adding , 7 which is the wait time in seconds until it breaks the line of code. Possibly because there is a slow run time on the script. But if you try it let me know if it works for you.
So I tried it in game and it still seems to have the same problem, so I tried End.PrimaryPart = End:WaitForChild(“Center”, 7) and this is what came out in the output
Well it’s relatively hard for me to identify an error from the screenshots you have provided, it would be easier for me to edit from the game itself. Unless of course you do not wish to do that then it’s completely fine, otherwise I would be more than willing to help.
Yes, I am aware of the process of doing that, but it seems that I am unable to give you editing permissions. It wont let me click allow you to edit. I’m not sure if you maybe have to be friends or what.