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)```
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.