Iv had help from people to try get this to work but its still failing to work in-game. My old script,
local Button = script.Parent
Frame = script.Parent.Parent.SurvivalMenu
function onClick()
if Frame.Visible == false then
Frame.Visible = true
elseif Frame.Visible == true then
Frame.Visible = false
end
end
Button.MouseButton1Click:connect(onClick)
Worked in studio but not in-game and I was given this script,
ImageButton6.MouseButton1Click:connect(function(onClick)
local Frame = game.StarterGui.SurvivalMenu.Frame
local ButtonOpen = game.StarterGui.SurvivalMenu.Open
local ButtonClose = game.StarterGui.SurvivalMenu.Frame.Close
ButtonOpen.MouseButton1Click:connect(function(onClick)
Frame.Visible = true
end)
end)
To open the GUI, but its still not wanting to open. I have also got a script to close the GUI but its not wanting to currently work.
Any help would be appreciated, thanks.

1 comment
Your old script should work just fine. Try changing "elseif Frame.Visible == true then" to just "else" at line 7.