Need Help Scripting a Highscore System

Hi,

I am currently working on a game that requires storing highscores for the user, that will display at the beginning of the scene and save over the previous time if the new one is better. I am trying to use player preferences, but I am having little luck. In a nutshell, this code is not saving the values to the player preferences, and i don’t know why. Is it something obvious or is there something that i am forgetting.Here is my current code:

var myTimer: float=2.0;
var GameCollision : String;
var myTime : float=2.0;
var reciver : int;
static var score : int = 0;
var highscore : int = 0; 

function Update ()
{
	if( reciver==0 ) {
	
	Highscore = PlayerPrefs.GetInt("High Score");
	guiText.text = highscore.ToString();
	myTimer+=Time.deltaTime;
	WaitForSeconds(5);
	guiText.text = myTimer.ToString();
	}
	
	
}

function OnCollisionEnter (myCollision : Collision) {
	if(myCollision.gameObject.name == (GameCollision) & reciver == 0  )
	{
		myTime=myTimer;
		guiText.text = myTime.ToString();
		reciver=1;
		if( score > PlayerPrefs.GetInt("High Score")) {     
    PlayerPrefs.SetInt("High Score", score);
    highscore = score;
    }	
	}
}

Also, does it make any difference if i am trying to implement this with multiple levels?

Thanks in advance.

Guess i didn’t. In a nutshell, this code is not saving the values to the player preferences, and i don’t know why. Is it something obvious or is there something that i am forgetting.