Here is my script
if (GunsDrawn == false)
animation.CrossFade ("DrawGuns");
gameObject.Find ("GunR").transform.parent = gameObject.Find ("GunR2").transform.parent;
gameObject.Find ("GunR").transform.position = gameObject.Find ("GunR2").transform.position;
gameObject.Find ("GunR").transform.rotation = gameObject.Find ("GunR2").transform.rotation;
if (GunsDrawn == true)
animation.CrossFade ("DrawGuns2");
gameObject.Find ("GunR").transform.parent = gameObject.Find ("GunR1").transform.parent;
gameObject.Find ("GunR").transform.position = gameObject.Find ("GunR1").transform.position;
gameObject.Find ("GunR").transform.rotation = gameObject.Find ("GunR1").transform.rotation;
Now the first part of the script works, if gunsdrawn variable is false then the position, parent and rotation will match GunR2 (Which is an empty game object) but the second part which says if GunsDrawn is true does not work. i believe I need an else statement in there but when I do that i get the error “expecting } found else”
Whats going on?