Best Score Saving issue,Score and Best Score issue?

I am making a pumpkin cutter game i am running score counter and saving best score using below code but i cn’t working .Best score is not saving and on gameplay score and best score show same numbers

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreScript : MonoBehaviour
public static int scoreValue = 0;
public static int highScore;
public Text scoreText;
public Text highScoreText;
Text score; // Use this for initialization\

void Awake () 
	score = GetComponent<Text> ();

	highScore = PlayerPrefs.GetInt("HighScore", 0);
	highScoreText.text = "" + highScore;

// Update is called once per frame
void Update () 
	score.text = "" + scoreValue;	
	highScoreText.text = "" + highScore;
	if (scoreValue > highScore)
		highScoreText.text = "" + scoreValue;

You need to set the int into the playerprefs whenever your game reaches its gameover state
and the scoreValue > highScore.

PlayerPrefs.SetInt("Highscore", scoreValue);

Also there are better ways to make a string from an integer type.

Instead of doing: "" + scoreValue;
You could do scoreValue.ToString();

search palyerprefts, you can use this method:

if(PlayerPrefs.GetInt(“BestScore”) < currentscore){
PlayerPrefs.SetInt(“BestScore”, currentscore);