local logged = Instance.new("BoolValue")
logged.Parent = player
logged.Name = "loggedIn"
local gui = playerGui:WaitForChild("modPanel")
local Login = gui.Login
local Frame = playerGui.modPanel.Frame
local isOpen = playerGui.modPanel.Open
function onClick()
if logged.Value == false then
if Login.Visible == false then
Login.Visible = true
elseif Login.Visible == true then
Login.Visible = false
elseif isOpen.Value == true then
Frame.Visible = false
isOpen.Value = false
elseif isOpen.Value == false then
Frame.Visible = true
isOpen = true
end
end
end
script.Parent.MouseButton1Down:connect(onClick);
I have got this script, the button works and the login screen opens, you can login and everything is fine, the Frame opens but you cannot close it in any way, no errors are printed out and I have tried everything
