Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

(ANSWERED) How come my Text Button isn't opening the Menu GUI?

#Introduction I have made a script that is supposed to open a GUI when clicked, but it won't work... Here is my script:

local Menu = game.StarterGui.Menu
Menu.Enabled = false
local Button = game.StarterGui.Button
Button.Clicked:Connect(function(hit)
Menu.Visable = true

#Conclusion Can somebody help me?

2 answers

✓ Accepted answer

Yes. See, if the GUI is disabled, everything inside is disabled too. Make sure it's a LocalScript, then type:

local Menu = game.StarterGui.Menu
Menu.Visible = false

script.Parent.MouseButton1Click:Connect(function()
       Menu.Visible = true
end)

If you need to make it so that the same button makes it invisible too, then type in the LocalScript:

local Menu = game.StarterGui.Menu
Menu.Visible = false

script.Parent.MouseButton1Click:Connect(function()
       if Menu.Visible = true then
              Menu.Visible = false
       else
              Menu.Visible = true
       end)
end)

here's a script, should do the job!

local Menu = game.StarterGui.Menu
Menu.Visible = false
local Button = game.StarterGui.Button
Button.Clicked:Connect(function(hit)
    Menu.Visible= true
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.