How do I do Highscore?

I had a perfectly working highscore, i've been using localstorage, it was storing the highscore and even though i closed down the Project and opened it a while later the highscore was sill what it last was, and it was working perfectly fine for weeks, until today,,

NaN is usually where you are trying to store the wrong data type, so i.e. trying to store text in a number variable. Look for some quotation marks that are in the wrong place, i.e. set score to "0" instead of 0.