I get Invalid get index 'highscore' (on base: 'Nil') when trying to save my highscore

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Carl

I keep getting this error is there anyway to fix it?
when I try to open my game it gives me this error

Save code:

func save():
var save_dict = {
	"highscore": highscore
}
return save_dict

func save_game():
	var save_game = File.new()
	save_game.open_encrypted_with_pass("user://savegame.save", File.WRITE, "enc")
	save_game.store_line(to_json(save()))
	save_game.close()

func load_game():
	var save_game = File.new()
	if not save_game.file_exists("user://savegame.save"):
		print("Error! We don't have a save file to load")
		return

save_game.open_encrypted_with_pass("user://savegame.save", File.READ, "enc")

var current_line = parse_json(save_game.get_line())

highscore = current_line["highscore"]
save_game.close()

Highscore code:

extends Label

func _ready():
	Global.load_game()
	text = "Highscore: " + String(Global.highscore)

func _process(delta):
	if Global.points > Global.highscore:
		Global.highscore = Global.points

pls help I want to release my game today or tommorrow