I'ma delete it soon, its already answered!
If the button is not a member of either 2 of the GUIs (meaning that it is its own GUI), you can do something like this:
-- In a LocalScript local button = script.Parent local plr = game.Players.LocalPlayer local gui1 = plr.PlayerGui["ScreenGui1"].Frame local gui2 = plr.PlayerGui["ScreenGui2"].Frame gui1.Visible = true gui2.Visible = false button.MouseButton1Click:connect(function(click) if gui1.Visible then gui1.Visible = false gui2.Visible = true else gui2.Visible = false gui1.Visible = true end end)
However, if the button was a parent of either GUI, you would need to add in the script from both buttons and using the same script would work, but changes would be needed.