So, I've been making a game, but I can't figure out how to make a Menu Button. Do I add a TextButton to the workspace and put a script inside it to show the GUI?
Roblox Wiki link: http://wiki.roblox.com/index.php?title=Intro_to_GUIs
I recommend getting help on scripting from ScriptingHelpers.org which is here xD, from Roblox wiki, or from the forums.
Instructions:
script.Parent.MouseButton1Click:Connect(function(onClick) --Creates a function when clicked script.Parent.Visible = false --Makes the parent [Button] transparent end)
Fun Fact:
You do not have to do MouseButton1Click you could do MouseButton1Up or MouseButton1Down meaning the same thing.
Extra Help:
script.Parent is the parent of the script. So if the script which is the script is in the 'TextButton' then TextButton is the parent of script so that is how you get script.Parent! Now what if you do script.Parent.Parent? Well, What is the parent of TextButton... If you have no frame it is the gui so script.Parent.Parent is the parent of TextButton which is the GUI.
script.Parent is in TextButton and it also could mean anything else in TextButton. You could have another script in TextButton and Disable it so you will use script.Parent.SCRIPTNAME.ANYTHINGinPROPERTY
Please accept my answer if it works :D
Have a Blessed Day, -Goldenkings11