private IEnumerator LoadNextLevel() { _fruitController.EndSpawning(); if (PhotonNetwork.IsMasterClient) { Debug.Log("Lets End this round..."); ScoreKeeper scoreKeeper = GameObject.FindObjectOfType <ScoreKeeper>(); GameObject goScoreKeeper; if (scoreKeeper == null) { goScoreKeeper = PhotonNetwork.Instantiate("ScoreKeeper", transform.position, Quaternion.identity); scoreKeeper = goScoreKeeper.GetComponent <ScoreKeeper>(); } Debug.Log($"Finding Score Keeper {scoreKeeper.gameObject.name}"); List <AoAPlayer> aoaPlayers = new List <AoAPlayer>(); aoaPlayers = _gameController.UpdatePlayers(); foreach (AoAPlayer player in aoaPlayers) { scoreKeeper.UpdateRoundScore(player.Player.ActorNumber, player.FruitCount); } photonView.RPC("RankPlayersRPC", RpcTarget.AllBuffered, scoreKeeper.ScoreBoard); if (nextLevel == 0) { Destroy(scoreKeeper.gameObject); } yield return(new WaitForSeconds(NetworkCustomSettings.SCORE_SCREEN_TIME)); // GameController.Instance.LoadNextLevel(nextLevel); _gameController.LoadNextLevel(nextLevel); } }