Umm.. My Bullet Script is giving me errors... Help?

}[/code]
var speed : int = 16000f;
var spawnPoint : Transform;
var Counter = Time.deltaTime;
var health : int = 10f;
private var shooting = false;
public var bullet : float = 1f; //Used For Damage to the character
function Update (){
if(Input.GetButtonDown(“Fire1”)){
shooting=true;
}
if(Input.GetButtonFalse(“Fire1”)){
shooting=false;
}
if(RaycastHit.Rigidbody){ //Used for damage indicator
health -= float;
}

}

And lastly, im not that good at coding, if you guys can help me thanks.

Is this the entire script? Are there any other scripts involved?

From what little you’ve posted, you’re not telling the script to do anything when shooting is true, you’re just telling it that the value of “shooting” is true when the fire button is held down…

Other problems:

  • There is no such thing as GetButtonFalse, so that’s not going to work for you… You probably meant GetButtonUp.

  • health -= float won’t work because float is a variable type, not a variable itself. health -= damage, as an example, might do something if you had a float or int variable named damage declared.

In short, I think you need to take a step back and look over some beginner Unity & scripting tutorials to get a handle on the basics. I’d be happy to provide links to some good starting points, if you’d like. There are tons of great ones out there!