Player not getting destroyed when hitted by a obstacle.

Hello!

I am new to unity and creating a game like suvwey surfer. I am learning c# and have no experience. My problem is that I want my character to restart when hitted by a obstacle I used box collider in my character and obstacles also used rigibody in my character.

Check out this:

OnCollisionEnter

Use OnCollisionEnter or OnTriggerEnter

Thanks it really helps me!