Simple score question

Here’s what I want to do; achieve this score (say 100) and load next level. And here’s my script:

#pragma strict
var score : int =0;
function Start () 
{
	GetComponent(TextMesh).text = PlayerPrefs.GetInt("score", 0).ToString();
}

function Update ()

{

if(score == 100){
Boo();

}

}

function Boo(){
	Application.LoadLevel("Level2"); 

}

I’m sure it’s something dead simple but i am really new to this.

I don’t know exactly what’s going wrong in your case, but you should save the score value read in the variable score, or it will be only appear in the 3D text:

function Start () 
{
    score = PlayerPrefs.GetInt("score", 0); // save the value in score
    GetComponent(TextMesh).text = score.ToString(); // then copy it to the text mesh
}