Problems with rigidbody collision

ok so i am trying to get the player to die when they collide with the enemy… this is my code right now:

Enemy.prototype.onCollisionStart = function (result) {
      if (result.other.rigidbody) {
          this.deadText.enabled = true;

but this calls an error in the gun script here:


but when i remove this.player.destroy(); it works just dandy, well except that when the bodies collide
the text thats supposed to say you are dead (this.deadText.enabled = true;) only flashes not staying on the screen
if anyone knows why this happens please help me. here is the project link so you can see what i am talking about