I need a script that will kill my player once he collides with the cube.

I am new to unity and trying to make a simple side scroller were you have to jump over the red cubes, if you hit the cube you die. I am using the 3rd Person Controller but i need help with the script on how to kill the player.

This is what you can do. Put a script to the cube.

OnTriggerEnter (other:Collider) {
   Destroy(other);
}

If you put this on the player you do this.

OnTriggerEnter (other:Collider) {
    Destroy(this);
}

Make a script that destroys an object that touches it if the object is named “Player”, or whatever your player object is called. You could put it in the “OnTriggerEnter” or “OnCollisionEnter” function in the script.