Constantly creating clones?

I want it so when i click it creates a clone, I have this but w/o click it is creating lots of clones!

var BulletSpawn : Transform; 
var Bullet : GameObject;

function Start () {

}

function Update () {
if(Input.GetButtonDown("Fire1"));
Instantiate(Bullet, BulletSpawn.transform.position, BulletSpawn.transform.rotation);
}
  1. You dont want to create a clone every frame, use a mechanic which lets you define at which rate (in seconds) you want to spawn your bullets.
  2. Input.GetButtonDown will only return true once as a result when you press the button down, after the frame it will always return false… Use Input.GetButton instead, which will return true as long as you hold your button down.

Thanks for the quick reply but I found out I made a simple mistake, I should have put

Instantiate(Bullet, BulletSpawn.transform.position, BulletSpawn.transform.rotation)

in here:

if(Input.GetButtonDown("Fire1")) Instantiate(Bullet, BulletSpawn.transform.position, BulletSpawn.transform.rotation);

Ah, missed that point, but your startpost was a little bit hard to understand :wink:

Aye, I really should work on making posts that I need help for more read-able :smile: