When I play this game, sometimes this error appears Cannot read properties of undefined (reading "body")

Do you have any idea how can I fix it?

Make "Enemy hit" global.

@bh, There are some problems, possibly "race condition", for local block (method == undefined) and clones of the dying clone, in

Process.prototype.evaluateCustomBlock
...
method = block.isGlobal ? block.definition