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

How would I script a menu?

Asked by 9 years ago

So, I was thinking of designing a Role Play Game but I want to know how to script a menu before I really get started on it. I would need a start button, options, tutorial, and lore. All I need is a basic menu. I just need to know how to add buttons and when I click them open a text page or open a secondary menu. Thank you for any help :)
~ Snowy99 P.S. Im not sure if this is even possible. But any advice would be welcome

3 answers

Log in to vote
2
Answered by
RAYAN1565 691 Moderation Voter
9 years ago

To create a script that changes the visibility of the Frames, etc., use this:

To make the GUI (Frame, etc.) visible:

function onButtonClicked() 
    script.Parent.Parent.PLACENAMEOFGUI.Visible= true --edit this line
end 

script.Parent.MouseButton1Click:connect(onButtonClicked)

To make the GUI (Frame, etc.,) not visible:

function onButtonClicked() 
    script.Parent.Parent.PLACENAMEOFGUI.Visible= false --edit this line
end 

script.Parent.MouseButton1Click:connect(onButtonClicked)
1
And also, place the script inside the button that's being clicked, which is usually the 'textbutton.' RAYAN1565 691 — 9y
Ad
Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago

This is NOT a request site. Please include any coding or research you have already done.

This is most commonly done with the MouseButton1Click event of TextButtonsand ImageButtons. When the GUI is clicked, it makes that GUI invisible, and another GUI visible. That's how you can make a 'secondary menu' appear. Now, please attempt the code and come back if you have problems.

0
Okay, thank you snowy99 0 — 9y
Log in to vote
0
Answered by 8 years ago

http://wiki.roblox.com/index.php?title=GUI_Guide

Answer this question