Creating High score using GUIText, '>' operation no working

All my game texts are GUIText and i’m trying to create a high score to display after each game ends. Every time i try to make an ‘if’ statement for when the score is higher than the highscore to change the highscore to that score, it either tells me you can’t use ‘>’ with GUIText or strings. here’s the end of my script where this is occuring, let me know if you need to see more script:

public void AddScore(int newScoreValue)
    {
        score += newScoreValue;
        UpdateScore();
    }

    void UpdateScore()
    {
        scoreText.text = "Score: " + score;
    }

    public void GameOver()
    {
        gameOverText.text = "Game Over!";
        gameOver = true;
        highscoreText.text = scoreText.text;

        if (scoreText > highscoreText) //this is where the problem is but there may be more issues
        {
            highscoreText.text = scoreText.text;
        }

    }

Yep, that’s a programming thing. You can’t compare strings to each other. (For example, is Nomenokes>Costawong? It doesn’t make any sense). You have to compare the actual scores.

if (score > highscore) 
         {
             highscoreText.text = scoreText.text;
         }

You may also want to get rid of line 16: highscoreText.text = scoreText.text;

If you don’t have a highscore int variable, you should make one.

-Nomenokes