public void AddScore(int worth, GameObject obj) { if (this.isServer) { score += worth; Rpc_SyncScore(score); Destroy(obj); if (score >= winningScore) { print("Rabbits Win"); isWin = true; CountRabbit cr = (CountRabbit)textMeshP.GetComponent <CountRabbit>(); cr.rabbitWin(); //indText.rabbitWin(); //Rpc_SyncGameEnd(); //Time.timeScale = 0; } } }