Projectile not creating particle effects on hit

I was implementing the FPS tutorial’s “create explosion on hit” part to my project but my particle effects seems to be happening inside the object I am hitting rather than on the surface. I tried modifying the hit location a bit to see if the effect moves out of the object but it doesnt seem to work.

Here is my code:

var CreateSparks : Transform;

private var lifeTime : float = 0.05f;

function OnCollisionEnter(collision : Collision)

{

//Rotate the object so that the y-axis faces along the normal of the surface    
var contact : ContactPoint = collision.contacts[0];    
var rot : Quaternion = Quaternion.FromToRotation(Vector3.forward, contact.normal);    
var pos : Vector3 = contact.point;
Instantiate(CreateSparks,pos,rot);
Destroy(this.gameObject,lifeTime);   

}

It’s some problems with the collision. Because i had same code. And the bullet goes inside the object. When i removed the collsion code. It bounced like it should. But when i had the code there it went through the object. The only way to fix that is using raycast thing for collision.