So, I wanted to make a book with pages and the pages are set to number values. I made 2 buttons so that when the right button is clicked the number value will go up and so should the page.
I only get the first page and then the code page seems to stay like that even if the number has gone up or down.
You'll see what I mean down here.
pgs = script.Parent.ForAuthors.Pages pageTable = {pgs.Page1.Value,pgs.Page2.Value,pgs.Page3.Value} pagewrite = script.Parent.pageHolder:WaitForChild("Page") Lb = script.Parent.LeftArrow Rb = script.Parent.RightArrow pgNum = 0 Rb.MouseButton1Click:connect(function() print("Page turned") pgNum = pgNum + 1 pagewrite.Text = pageTable[1] print(pgNum) end) Lb.MouseButton1Click:connect(function() print("Page turned back") pgNum = pgNum -1 print(pgNum) end)