Label not showing up/moves around every time i load it

Im having some problems with my game, whenever the character dies the menu is loaded and it is meant to show a label with the player score, however the label doesnt show up. It shows up on the menu whenever I load the game however after the player dies and the menu loads, the label is no longer there. If anyone can help me i would greatly appreciate it.
Code from my score script:

local function load_highscore()
	local filename = sys.get_save_file("sys_save_load", "highscore")
	local data = sys.load(filename)
	return data.highscore
end

local function save_highscore(highscore)
	local filename = sys.get_save_file("sys_save_load", "highscore")
	sys.save(filename, { highscore = highscore })
end

local function update_labels(highscore)
	label.set_text("score#label", "SCORE\n" .. tostring(highscore))
end

function init(self)
	self.highscore = load_highscore()
	update_labels(self.highscore)
end

code from my menu:

    local function animation5(self, node)
	if gui.get_node("background") == node then
		local to_color = gui.get_color(node)
		to_color.w = 0.6
		gui.animate(node, gui.PROP_COLOR, to_color, gui.EASING_OUT, 2.4, 0.1)
	end
end

local function animation4(self, node)
	local s = 1
	gui.animate(node, gui.PROP_SCALE, vmath.vector4(s, s, s, 0), gui.EASING_INOUT, 0.24, 0, animation5)
end

local function animation3(self, node)
	local s = 1.06
	gui.animate(node, gui.PROP_SCALE, vmath.vector4(s, s, s, 0), gui.EASING_INOUT, 0.24, 0, animation4)
end

local function animation2(self, node)
	local s = 0.98
	gui.animate(node, gui.PROP_SCALE, vmath.vector4(s, s, s, 0), gui.EASING_INOUT, 0.24, 0, animation3)
end

local function animation1(node, d)
	local start_scale = 0.7
	gui.set_scale(node, vmath.vector4(start_scale, start_scale, start_scale, 0))

	local from_color = gui.get_color(node)
	local to_color = gui.get_color(node)
	from_color.w = 0
	gui.set_color(node, from_color)

	gui.animate(node, gui.PROP_COLOR, to_color, gui.EASING_IN, 0.4, d)

	local s = 1.1
	gui.animate(node, gui.PROP_SCALE, vmath.vector4(s, s, s, 0), gui.EASING_IN, 0.4, d, animation2)
end

function init(self)
	sound.play("go#sound", {delay = 0, gain = 5, pan = 0, speed = 1.15})
	local d = 0.4
	animation1(gui.get_node("new_game"), d)
	animation1(gui.get_node("new_game_shadow"), d)
	animation1(gui.get_node("new_game_button"), d)

	d = 0.3
	animation1(gui.get_node("quit"), d)
	animation1(gui.get_node("quit_shadow"), d)
	animation1(gui.get_node("quit_button"), d)

	d = 0.1
	animation1(gui.get_node("background"), d)

	msg.post(".", "acquire_input_focus")
	self.button = gui.get_node("new_game_button")
	self.button2 = gui.get_node("quit_button")
	self.is_over = false
	self.is_over2 = false
	node_to_hide = self.button
	gui.set_enabled(node_to_hide, false)
	node_to_hide2 = self.button2
	gui.set_enabled(node_to_hide2, false)
end

function on_input(self, action_id, action)
	if action_id == nil then
		if gui.pick_node(self.button, action.x, action.y) then
			if not self.is_over then
				local node_to_hide = self.button
				gui.set_enabled(node_to_hide, true)
				self.is_over = true
			end
		else
			if self.is_over then
				local node_to_hide = gui.get_node("new_game_button")
				gui.set_enabled(node_to_hide, false)
				self.is_over = false
			end
		end
		if gui.pick_node(self.button2, action.x, action.y) then
			if not self.is_over2 then
				local node_to_hide = gui.get_node("quit_button")
				gui.set_enabled(node_to_hide, true)
				self.is_over2 = true
			end
		else
			if self.is_over2 then
				local node_to_hide = gui.get_node("quit_button")
				gui.set_enabled(node_to_hide, false)
				self.is_over2 = false
			end
		end
	end
	if action_id == hash("fire") and gui.pick_node(self.button, action.x, action.y) then
		msg.post("main:/loader#loader", "killmenu")	
		msg.post("main:/loader#loader", "load_level")
	end
	if action_id == hash("fire") and gui.pick_node(self.button2, action.x, action.y) then
		msg.post("@system:", "exit", {code = 0})
	end
end

Sorry im not sure why the code didnt format correctly here

You need to surround you code with three backticks on an empty line before and after.

How is the score.script used? Are you sure it is used in the places you expect it to?

What if you put a breakpoint in the init() function and run with the debugger enabled?

Hey so I have had another play around with the code and I’ve realised that when I first run the game and the menu opens, the score label appears in the right place, however after the player dies and the menu is loaded again, the label is in a random place (and often not on the screen which made me believe it wasnt being loaded). I dont know how to fix this as I havent got any code that gives it random co-ordinates.

Are you using a camera? Maybe you need to reset the camera position so that the label is in the right place?

Yes I am using a camera and that would make sense as to why my code isnt working, i have tried disabling the camera when the menu is loaded, however that didnt seem to work. Is there a way to reset the camera instead?

You need to reset the position of the camera to 0,0. Or add a new camera to your menu and enable that camera instead.

I looked it up and couldnt find a way to set the co-ordinates of the camera, I could only see how to change the near and far Z but that isnt what I need.

You move the game object the camera is attached to