Why won't my shop select system work?

I’m trying to make it so if you press next the image is set to the correct image, for some reason this won’t work and is not throwing an error. Script in StarterGui:

local pageNumber = 1

local minimumPages = 1
local maximumPages = #imageIDS

nextButton.MouseButton1Click:Connect(function()
	if pageNumber >= 1 and pageNumber <= maximumPages then
		pageNumber += 1
		imageIDS.Image = imageIDS[pageNumber]
	end
end)

backButton.MouseButton1Click:Connect(function()
	if pageNumber >= 1 and pageNumber <= maximumPages then
		pageNumber -= 1
		imageIDS.Image = imageIDS[pageNumber]
	end
end)```

I need a bit context, what is imageIDS ?

1 Like

Hey, sorry, I’ve fixed it now. aaaaaaaaaaaaaaaa

I beileve its the images he wants the buttons or whatever hes trying to change to become. He may have annotated it so that he doesn’t leak the ID.

1 Like

You were likely just missing references to the nextbutton & backbutton in the script, I see you’ve fixed it now but for anyone who happens to view the thread and wasn’t sure.