IEnumerator Fire() { shootOnCD = true; isShooting = true; transform.Find("Karakter_3").GetComponent <Animator>().SetBool("isShooting", true); transform.Find("Karakter_2").GetComponent <Animator>().SetBool("isShooting", true); transform.Find("Karakter_1").GetComponent <Animator>().SetBool("isShooting", true); transform.Find("Karakter_0").GetComponent <Animator>().SetBool("isShooting", true); ShootProjectile.shoot(); PlayerVariables.changeHealth(-1); yield return(new WaitForSeconds(0.14f)); source.PlayOneShot(skudd, vol); isShooting = false; transform.Find("Karakter_3").GetComponent <Animator>().SetBool("isShooting", false); transform.Find("Karakter_2").GetComponent <Animator>().SetBool("isShooting", false); transform.Find("Karakter_1").GetComponent <Animator>().SetBool("isShooting", false); transform.Find("Karakter_0").GetComponent <Animator>().SetBool("isShooting", false); shootOnCD = false; }