How to Destroy a gameobject on collision

I need to know how to destroy a zombie gameobject on collision, but with a delay of say 5 seconds I’m new at scripting so I don’t know how to do this. And when you write the script please varify what form its in, for example is it in javascript or CScript. Thanks

I would suggest taking a the time to watch a few tutorials, you will be able to help yourself alot more just by watching some basic ones. UnityStudent check out this link it will cover exactly what you want and probably other things you might find your self thinking of implementing.

Scripting Reference : OnCollisionEnter

You can read up on Destroy(); here: Unity - Scripting API: Object.Destroy

It has a feature already where you can set the delay of the destruction, to check collisions you should use the OnCollisionEnter function.

-#pragma strict

OnCollisionEnter (des : Collision)
if(des.gameobject.tag == “destroyer”)