i need help with a c# script for triggers

i made a game where you fly a ship and jump over obstacles and what i want to do is when the ship collides with the obstacle the ship loses a health and the obstacle is destroyed when the ship reaches 0 health the game loads the main menu .

can anybody write the script in c# cant find any good tutorial on c# with this been trying to make this for 2 days now

welcome to the forum :slight_smile:

there is a specific scripting forum for these questions just below this one. also there is a wiki with lots of code snippets. did you check them yet?