How to keep a global score?

Hi! I’m trying to make a global score script , to keep score , even when i change scenes .
I got a fruit ninja like game , and when i cut somethin i get 2 score points . This score resets everytime i load the scene . I searched but i didn’t find any answer . This is what i got now :

#pragma strict

static var currentScore = 0;

static var globalscore =0;

var offsetY : float = 40; var sizeX : float = 100; var sizeY : float = 40;


function OnGUI () { 	GUI.Box (new Rect (Screen.width/2-sizeX/2, offsetY, sizeX, sizeY), "Score: " + currentScore);

}

Have a look to the Game Manager used in our tutorial: Level Generation - Unity Learn

It’s a singleton with a call to DontDestroyOnLoad.