public void Freeze() { aud.enabled = false; GameObject[] powerCookies = GameObject.FindGameObjectsWithTag("PowerCookie"); foreach (GameObject powerCookie in powerCookies) { powerCookie.GetComponent <PowerCookieScript>().Freeze(); } blinkyScript.Freeze(); inkyScript.Freeze(); pinkyScript.Freeze(); clydeScript.Freeze(); pacmanScript.Freeze(); this.freeze = true; }