only the first command worked not the menu popping up
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Visible = false game.StarterGui.MenuFolders.MainMenu.ScreenGui.Frame.Background.Visible = true end)
We need a little more information, otherwise we can't help, i dont tthink a gui will show up if it's in a folder, if your looking for a pop-up code, this may help:
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Visible = false wait(5) script.Parent.Parent.Visible = true end)
Make sure this is a local script inside a TextButton or ImageButton. You will need to change line 2 and 4 of course to fit your UI Area.