So I made a Close Gui script and an Open Gui script and both won't work here are the scripts
local GUI = game.StarterGui.Roka
local Button = script.Parent
Button.MouseButton1Click:Connect(function()
GUI.Enabled = false
end)
local GUI = game.StarterGui.Roka
local Click = script.Parent.ClickDetector
Click.MouseClick:Connect(function()
GUI.Enabled = true
end)

4 comments
The close script is working now but the open one isn't
do the same for the other one
its a click detector
click detector returns the player, Click.MouseClick:Connect(function(player) player.PlayerGui.GUI.Enabled = true end)