IEnumerator KillingDazza() { //Run Dazza's death animation yield return(new WaitForSeconds(3)); //Change this to the length of Dazza's death animation plus a second if (upgradeController.Revive() && !alreadyBeenRevived) { Debug.Log("Dazza has a revive"); ReviveDazza(); } else { gameController.SaveDollaryDoos(); Highscore highscore = FindObjectOfType <Highscore>().GetComponent <Highscore>(); if (highscore != null) { if (!gameData.newScoreIsSet) { highscore.CompareHighScore(); } else { Debug.Log("score already been set"); } } else { Debug.Log("Highscore script not found. Make sure you're starting from the preload scene"); } inGameMenu.DeathScreen(); } }