Gui text, ammo counter

var projectile : Rigidbody;
var speed = 10;
var ammotext : GUIText;
var ammo = 75;

function Update () {

if ( Input.GetButtonDown("Fire1")){

clone = Instantiate(projectile, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection( Vector3 (0, 0, speed));

Destroy (clone.gameObject, 5);



}


}

Can someone help me. I don’t really understand how to get the ammo text to go negative one every time i shoot.

Well, if you want to put anything on a GUI, you have to use OnGUI() as a function:

function OnGUI()
{
	AmmoGUI.text = "Ammo: " + ammo + "/" + totalAmmo;
}

As Trollvahkiin said, you have to subtract your ammo everytime you fire, and then after that, call the OnGUI() method to update the GUI Text.