Game crashes when i hit the space bar

help everytime i launch the game i can move side to side but as soon as i hit space it crashes

here are my links
https://playcanvas.com/editor/scene/2083474
https://playcanvas.com/editor/code/1261503?tabs=198161379

please help

I think it’s because of an infinite loop or something.

Your laser template has an input script and I don’t think it should be there.

Don’t forget to apply the changes you made to the template.

You can do this on top with the ‘Apply All’ button after you made a change.

image

You probably also want to import ‘Ammo’ for the physics.

that worked a lot thanks it doesnt crash the game now but it does lag when i hit space any ideas?