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
Can somebody help me?
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)