how do i kill my player on impact with a enemy

how do i kill my player when he touches a enemy…
no matter how many times i try he doesn’t die…

Make sure the player has a collider, and the enemy has a rigidbody, and make the players tag “Player”, then attatch this code to the player in javascript:

function OnControllerColliderHit (hit : ControllerColliderHit)
{
if(hit.transform.tag == "Player"){
  Debug.Log("Hit the Enemy");
  Destroy(gameObject);
  }

}

Good luck!