How To Make Make A Gui Appear

I want to make a tutorial similar to Ninja Legends. When you click the next button the Gui disappears and another one takes it’s place. I made a Gui so when you click on the next button it disappears, but I don’t know how to make another Gui appear when the other one disappears.

5 Likes

More elaboration would be helpful, and I’m 99% sure google has your answer.

1 Like

Try making an Gui named "Tutorial"then in it you have sort of pages,then for example,when you click at the “Next” button,in the first page,then the second page appears:

PlayerGui.Tutorial.Pages.Page1.NextButton
PlayerGui.Tutorial.Pages.Page2.Visible = true
(Page2 is currently Visible = false,with that propertie setted by the properties tab(manually))

If this has nothing to do with it,i can delete it if you want.

Edit:

ScreenGui is actually PlayerGui,sorry for that

Start off with the visible properties of the following GUI pages set to false. When you click the next button, set the next page’s visibility property to true and that of the one before to false.

1 Like

If I put all of the frames and text lables in the same screen gui won’t they all become not visible when I disable visible and all become visible when I enable visible? Or can I make it so that one frame can become visible while the other one is invisible?

It’s quite simple, just play with the properties, which are visible if, they’re enabled or disabled. So, I’ll provide you, an example script, maybe, it’ll help you, more.

Example Script
local StarterGui = game.StarterGui
local ScreenGui = StarterGui.ScreenGui
local Pages = ScreenGui.Pages
local Page1 = Pages["Page 1"]
local Page2 = Pages["Page 2"]
local NextButton = ScreenGui.NextButton

NextButton.MouseButton1Click:Connect(function()
    Page1.Visible = false
    Page2.Visible = true
end)
4 Likes

Do i need to put all of the frames under the same gui?

2 Likes

Yes(This message is due to 30 char)

UIPageLayout can do virtually all the work for you in this case, it would just require extra additions from your end if you wanted further integrations. The API is self explanatory and can be accessed from the hyperlinked text so if you want to look into it, give it a try first.

2 Likes

No, you don’t need to. You can create multiple ScreenGui, it’ll still work properly.

2 Likes

Oh sorry,well you can do what he said,but depending on what you want to do,the StarterGui may have a lot of ScreenGui’s

So to declarify,you got the answer of your question?

What does player gui mean because i get an error saying a ScreenGui is not a valid member if PlayerGui.

I think its StarterGui,close to StarterPack and StarterPlayer

PlayerGui is where all of the Gui’s from StarterPack replicate to when you load in a game.

Also, you said you got an error? May you send the code?

1 Like

I found the error but thanks. chaarrrrr