i know it’s a simple scrip issue, but in new around here and can’t seem to figure it out
thank you in advance
Here is my script`void Awake ()
{
this.highscore = PlayerPrefs.GetInt(“HighScore”);
PlayerPrefs.Save ();
if (instance == null) {
instance = this;
} else if (instance != this)
{
Destroy (gameObject);
}
}
void Update ()
{
if (gameOver == true && Input.GetMouseButtonDown (0))
{
SceneManager.LoadScene (SceneManager.GetActiveScene ().buildIndex);
}
}
public void BirdScored()
{
if (gameOver)
{
return;
}
score++;
if (score > highscore)
{
highscore = score;
PlayerPrefs.SetInt("HighScore", score);
}
Score.text = "Score: " + score.ToString ();
Highscore.text = "HighScore: " + highscore.ToString ();`