void HighScoreMessage() { //get highscore int score = RankingManager.GetHighScore(); //update highscore text highscore.text = "" + score; //check if current scores are higher! //then activate new highscore message PointsSystem ps = GameObject.FindGameObjectWithTag("PointsManager").GetComponent <PointsSystem>(); p1 = ps.GetP1Points(); p2 = ps.GetP2Points(); //new highscore from p1 if (p1 > p2 && p1 > score) { p1High.SetActive(true); p2High.SetActive(false); highscore.text = "" + p1; } else { //new highscore from p2 if (p2 > p1 && p2 > score) { p1High.SetActive(false); p2High.SetActive(true); highscore.text = "" + p2; } else { p1High.SetActive(false); p2High.SetActive(false); } } }