Script that prints passed info, but doesnt do anything with it, thoughts?

So I have this script, that prints the passes info from a binable event, so for example it would print “Map1” but it doesn’t change the text of a textlabel, the value of the string value, or the decal. No output errors.

local event = script.Parent.event
local image = script.Parent.board.image.SurfaceGui.ImageLabel
event.Event:Connect(function(map1name)
	
	script.Parent.map.Value = map1name
	script.Parent.board.nameofmap.SurfaceGui.TextLabel.Text = map1name
	
	if map1name == 'Map1' then
		image.Image = 8899237136
	elseif map1name == 'Map2' then
		image.Image =  8899270003
	elseif map1name == 'Map3' then
		image.Image = 8899269265
	elseif map1name == 'Map4' then
		image.Image = 8899270003
	end
end)

Edit: took out the print(map1name), still works. Just noticed that it was missing

Correct me if I’m wrong but shouldn’t the quotes be like this :

if map1name == “Map1” then
             image.Image = 8899237136

still doesnt work. (characters)

It should be like this

if map1name == 'Map1' then
		image.Image =  "rbxassetid://8899237136"
1 Like

Thank you, I was really stumped