Gdevelop crashing when I kill an enemy

Currently when I kill an enemy ( a health bar is included) my game will crash. This seems to happen randomly and I cant figure out why this is happening.

The enemies respawn and have pathfinding to the player.

Link: gd.games game build (Please ignore the health bar)

(all credit for images go to the original/current owners of arras.io, i do not own anything related to this game)
Images:

(This is most of the bot code)

also in the chrome console it says : " pathfindingruntimebehavior.js:1 No path was found after covering 233534.2052034348 cells. "

Thankyou for all help.

EDIT: I have been able to limit the amount of crashes, but only by a small amount. I did this by changing where the health bar of the enemy spawns.

That is really strange! I had the same problem on your game build. Could you maybe type in your events for killing enemies?

Also, welcome to the forum! Hope you find lots of help here!

Hey Shark,

I uploaded most of the bot code to the original post,
Ill put it here aswell:

Thanks for all help

I dunno, I’m not that great at GDevelop, but… for the bot’s health, you may just want to use the “Health points and damage” extension, which is super easy to use.
EDIT: I also noticed several bugs…
~The bullet comes out slightly left of the barrel
~There’s a random bullet lying around
~When you die… the screen goes blank

Someone in the discord server had a similar issue where creating a light object in the border of a object would just crash the game.

But the error tells about the pathfinding behavior, can you try using the NavMesh pathfinding behavior as a workaround? You can download it from the extensions tab.