I tried closing the first GUI with script.Parent.Parent.Parent.Visible = False and then opening the other GUI, but nothing i tried worked.
In a localscript, use the path game.Players.LocalPlayer.PlayerGui...
to wherever the GUI is instead of finding the Parent of the script.
Also the Visible = False
should be a lowercase F: Visible = false
This is very easy when you understand it. Use the command not.
script.Parent.Parent.Parent.Visible = not script.Parent.Parent.Parent.Visible
not will reverse Visible if it is false or true