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.