- Home /
How can i get the following script back on track to being a single level high score saver
hello, I'm trying to save highscore for single level on guitext to be next to current score. Is my script headed in the right direction if im trying to put on a second guitext next to score on each individual level? Thanks in advance.
var levelscore: float;
var hiscore: int;
function Start()
{
PlayerPrefs.SetFloat("hiscore", levelscore);
print("saved");
}
function Update() {
if(PlayerPrefs.GetFloat("levelscore"))
{
guiText.text = "HighScore "+levelscore;
levelscore == gameObject.Find("Score",int);
print("got Hiscore");
}
Your answer
Follow this Question
Related Questions
How to save a high score 2 Answers
PlayerPrefs HighScore problems, it doesn't work. 4 Answers
PlayerPrefs 2 Answers
I'm trying to set a high score but I can't display it in another scene? 2 Answers
PlayerPrefs.GetInt does not show up 1 Answer