i was making a grenade for my fps game but it kept giving the false error or at least i think it was a false error. the error was BCE0044 expecting :, found “;” but i dont know why it is saying that
Here is the script. the part Throwg(); is where its giving me the error but when i remove it it gives me the error but on the line below it
function Update ()
{
if(Input.GetButtonDown("Granade"));
{
Throwg();
gameObject.animation.Play(Throw);
animation.[Throw].speed =2;
}
}
function Throwg()
{
yield WaitForSeconds(2);
var gren : Rigidbody = Instantiate(Granade,Spawn.position, Spawn.rotation);
gren.AddForce(gren.transform.forward*ThrowSpeed);
gameObject.SetActiveRecursively(false);
}