Script 1
-- Variables GUI = script.Parent.Parent Frame1 = GUI.AFrame Button = script.Parent.Parent.OpenClose Button2 = GUI.AFrame.X GUIOpen = false Button3 = GUI.AFrame.Next Page1Open = false Frame2 = GUI.BFrame ---------------------------- Button2.MouseButton1Down:connect(function() Frame1.Visible = false GUIOpen = false if GUIOpen == false then script.Parent.Parent.OpenClose.Visible = true elseif GUIOpen == true then GUIOpen = false end end)
Script 2
-- Variables GUI = script.Parent.Parent Frame1 = GUI.AFrame Button = script.Parent.Parent.OpenClose Button2 = GUI.AFrame.X GUIOpen = false Button3 = GUI.AFrame.Next Page1Open = false Frame2 = GUI.BFrame --------------------------- Button.MouseButton1Down:connect(function() wait() if GUIOpen == false then Frame1.Visible = true Button.Visible = false GUIOpen = true end end)
You never set GUIOpen
to true.
Since you never set it to true, it will always be false. Since it will always be false, the 'closing' part of the if statement will never run.
Just set it to true.
if GUIOpen == false then script.Parent.Parent.OpenClose.Visible = true GUIOpen = true