Enemy Life not reducing when hit with a bullet

So my problem is that when I shoot the enemy with a bullet three times, the enemy should die. However it does not work. I know the collision is working because the bullet gets destroyed, but I get the following error : NullReferenceException: Object reference not set to an instance of an object

here is my bullet collision script:

function OnTriggerEnter(enemy : Collider){
if(enemy.tag == "Enemy")
	enemy.GetComponent(EnemyMove).life -= 1;

On the enemy script called EnemyMove, the variable “life” is public and is also an integer that equals 3 when the script is initialized (3 bullets hit, life equals 0).

Then on the enemy Script, I simply say in the update:

    if(life <= 0)

Any help would be greatly appreciated. I’m sure it’s a simple solution too.

There is probably not an EnemyMove script on the Collider object.

The bullet is too fast and missed the trigger, you need to use raycast

function Shoot () {
var hit : RaycastHit;
if (Physics.Raycast (transform.position, Vector3.forward, hit, 100.0)) {
if(hit.transform.gameObject.tag == “enemy”)
hit.transform.GetComponent(EnemyMove).life -= 1;