Game breaking randomly

hey so basically whats happening is if you play the game, sometimes randomly the game will break, and the wave wont go up again and ive been trying to figure out what is causing it but I cant.

game

theres the link so i would appreciated it if someone could play the game and watch what happens when its breaking and try to figure it out. thanks.

Hi @existism!

The game already starts with errors and warnings, which makes it difficult to track down the cause of the issue.

I suggest first making sure the game runs without any errors.

ok its fixed, the error you were talking about, i mean. sorry about that

random = Math.floor(Math.random() * 125)
element = this.app.root.findByTag('element')[random];  
elementclone = element.clone();

How many elements are in your project?

128

That’s good.

For some reason elementclone is sometimes undefined.

Sorry, I was not correct.

For some reason the rigidbody component of elementclone is undefined.

Are you sure all elements have a rigidbody component?

Yeah, sorry, not all of them did. That should be fixed now. Multiple people are working on this and adding new stuff, and I think someone forgot to add the rigidbodies to some of them.