constant fire (transform)

my script has a way of firing prefabs (source: TornadoTwins) does anyone know how 2 change the following script so that it fires constantly, thank you:


        var bullit = Instantiate(bullitPrefab, GameObject.Find("spawn").transform.position, Quaternion.identity);
    bullit.tag = "Smaugus3000laser";
    bullit.rigidbody.AddForce(transform.forward * 40000);

Change GetButtonDown to GetButton. Get Button returns true while the button is held down, GetButtonDown only when it is depressed (you have to release the button to call it again).

You could also use invokerepeating:

var rateOfFire = 2.0;
var Bullet : Transform;

function Update ()
 //Fire bullets!!

      var rateOfFire = .1;

         if (Input.GetButtonDown("Fire1"))

            InvokeRepeating("Shoot", .001, rateOfFire);

               if (Input.GetButtonUp("Fire1"))


function Shoot ()


var Bullet =       Instantiate(Bullet,transform.Find("BulletSpawnPoint").transform.position,


Make sure that where there stands "BulletSpawnPoint" type your own location of where you want the object to spawn.It needs the exact same name