Detecting a colission with an instantiated object.

Hi im making a FPS game, but i have only one problem left, i have dynamic enemies that shoots instantiated bullets, the problem is i cant get my character collider detects the collision with the bullet, and then rest an ammount of life to the HP, this is the script attached to my characters collider:

function OnControllerColliderHit (hit : ControllerColliderHit)
{
 if(hit.gameObject.tag == "bullet"){
 	
 transform.parent.SendMessage("EnemyHit", 5, SendMessageOptions.RequireReceiver);
 }
}

Thanks for your help!

The problem may be due to the speed of the bullets. To deal with bullets (or other fast moving objects) you typically want to set the Rigidbody.collisionDetectionMode setting to “Continuous” or “ContinuousDynamic” to deal with this. The following page explains this: