How to Destroy an Object while bullet is colliding it

Hello Everyone,

I am a beginner for Unity and I am keeping on learning JavaScript
As a Tutorial Project
I started making a racing game which shoots the bullet from the car
My project is halfway successful
I can move my car
I can Shoot
I can blend Animations

through some command or functions

but still I cant Destroy the enemy with the bullet

I want to destroy the object while colliding it

So Guys Please help me as faster as you can

Thank you

function OnTriggerEnter (hit : Collider){

if(hit.gameObject.tag == "enemy"){
   Destroy(hit.gameObject);
}
}

Add this script to your bullet…I’m not sure will it work, but you should try it.

@Arshad
One thing that might also be the problem is the Fixed Timestep.
Make sure its small enough (Edit → Project Setting → Time , change it to 0.01).
Also make sure the bullet speed is not too big.

Hope it helped.
Guy.