why does my turret rapidly shoot

i am new to unity and i am following tornadoTwin’s tutorial but my turret is rapidly shooting and i want to know if anybody can help me with this problem.

here’s the code

var LookAtTarget : Transform;
var damp : float = 6.0;
var bullitPrefab : Transform;
var savedTime = 0;

function Update ()
{
     if(LookAtTarget)
     {
          var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position); 
          transform.rotation = Quaternion.Slerp(transform.rotation, rotate, Time.deltaTime * damp); 
          var seconds : int = Time.time;
          var oddeven = (seconds % 2);
          if(oddeven) 
              Shoot(seconds);
          //transform.LookAt(LookAtTarget);
     }

}

function Shoot(seconds)
{
     if(seconds!=savedTime)
     {
          var bullit = Instantiate(bullitPrefab,transform.Find("spawnPoint").transform.position , Quaternion.identity);
          bullit.rigidbody.Addforce(transform.forward * 1000); savedTime=seconds;
     }
}

You are trying to access the non-existing function bullit.rigidbody.Addforce() due to a typo. As a result, your code throws an exception, and any code after that line is not executed, so savedTime is never updated. The correct name is “AddForce”.

Solution: Always add this line at the beginning of any of your Javascript files to prevent this kind of mistakes:

#pragma strict

There is a reason this line is automatically inserted when you create a new script.

Tip: You should always check the Console output for any problems. In your case, it should have printed the error after pressing play. The error should also be shown at the very bottom of the Editor in Unity’s status line.