Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make the GUI have a next page button?

Asked by 10 years ago

I have a TextButton on the bottomright corner to go to the next page for my music player but clicking it doesn't take it to the next page. So I'm wondering what would I need to do to the GUI? It's reached its limit of 18 songs so I want to make a new page. Help please. EDIT: its* not it's*

3 answers

Log in to vote
1
Answered by 10 years ago

Alright so what you wanna do is insert the button map it out how you like it and stuff then So insert a local script inside the button

local player = game.Players.LocalPlayer

function click()
player.PlayerGui.GuiNamehere.Page1.Visible = false
end

script.Parent.MouseButton1Down:connect(click)

Where it says Guinamehere then do .Page1 if your gui is like that, Idk how to explain but edit the PlayerGui.Guiname etc part to your personal likings also you will wanna add a 2nd line inside that to make the first page not visible so

local player = game.Players.LocalPlayer

function click()
player.PlayerGui.GuiNamehere.Page1.Visible = false
player.PlayerGui.GuiNamehere.Page1.Visible = true

end

script.Parent.MouseButton1Down:connect(click)

Now that will just take you to the 2nd page when u push the button now you have to invert the true's and false's but exact same script on the 2nd page button to go back to the first page.. Here I've made a model to help you if you still dont understand It's an example, Feel free to use the scripts inside it! http://www.roblox.com/Page-test-for-ShadowWolfXZ-item?id=155083759

0
THANK YOU SO MUCH! I appreciate that answer and that you made a model for me. :) ShadowWolfXZ 25 — 10y
0
No problem, Ik how much it helps when you finally find something out in a script Blueperm 15 — 10y
0
Wait! I have another issue. With your script it removes previous songs on there then I press previous page button and it removes all songs from previous page and all the new songs have replaced the previous one on both pages. ShadowWolfXZ 25 — 10y
0
I can give you the model if you'd like. So you can see what I mean. ShadowWolfXZ 25 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

You would need to make the first gui go invisible, and inactive, and then make the other that is in the same place become visible, onclicked.

Log in to vote
0
Answered by 10 years ago

This should help:

https://www.youtube.com/watch?v=kIHaoRknOjg&list=LLImEVtQjAYoGnE9uNkfN5BQ&index=3

Answer this question