How Do I Make GUI Pages?

Hello, I have been thinking of adding GUI Pages system but I don’t know how!
By GUI Pages system, I mean like a next and previous button on a GUI, how do I do that?

Something like this:

> Frame (Background Frame)
  > Frame (Page1)
  > Frame (Page2)
  > Frame (Page3)
  > Frame (Buttons)
    > TextButton (Next)
    > TextButton (Previous)
  • When the Next button is pressed, go to the next page (Page 1 → Page 2)
  • When the Previous button is pressed, go to the previous page (Page 2 → Page 1)

Uhh, I still don’t get it lol, I just don’t understand

Can you be a little more specific, like how the frames are shown, or the code, or both, etc.?

Ahh, I get it now, but how can I make go previous and next when I’m making a tool shop gui and I’m doing I, V Pairs to get the items?

You can make a loop, which, given the number of tools and each tool for a page, we can make frame1, frame2, … framenth, and loop through them.

I know, but how would the next and previous button work to possibly go to the next frame?

you could use a UiPageLayout for this

I don’t think you get it, I want to know how to make a next and previous button GUI

You could use uiPageLayout:JumpTo() with your buttons

So we can have a local script for the next and previous like this:

-- LocalScript

local BackgroundFrame = script.Parent
local currentNum = nil
local pageNum = 1

local currentFrame = nil

local function update()
  local frame = BackgroundFrame:FindFirstChild("Page"..pageNum )

  if frame then
    currentNum = pageNum 
    if currentFrame  then
      -- Hide currentFrame 
    -- Show frame 
    pageNum = currentNum or 0

local function goBack()
  pageNum = pageNum - 1

local function goNext()
  pageNum = pageNum + 1

I think this can work, but I have never tried uiPageLayout, so I think you should check that out.

Wow Thanks, it has actually worked!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.