ok so i figured out in my game how to count down lives when i crash into an obstacle but i would like to destroy the obstacle the second i trigger the obstacle can someone tell me what to write i have the script attached to my character or more like a ship so if i type Destroy(gameObject) it destroys the ship but i want to destroy the obstacle.
Its very simple, if you are using OnTriggerEnter, just call the collided object to destory for example,
void OnTriggerEnter(Collider coll)
{
Destroy(coll.gameobject)
}
That will destroy what ever your collider hits.
worked thanks