i made a script that closes the current frame and opens another, but it only closes the current frame and doesnt open the other frame. heres the script. someone told me making it an if statement would fix but it didnt.
frame = script.Parent.Parent local nframe = game.StarterGui.Menu.About
script.Parent.MouseButton1Click:connect(function() if frame.Visible == true then frame.Visible = false end wait(0.6) if nframe.Visible == false then nframe.Visible = true end end)

8 comments
:Connect not :connect
make frame local
You're trying to access startergui using a local script. The actual Gui the player sees is already in their own PlayerGui under their LocalPlayer. If you'd actually provide the code instead of a gyazo, i'd be able to give an answer.
nframe goes to the startergui not the player's gui change it to like script.Parent -- Location
frame closes fine and works fine, but nframe wont open, it checks it visible but it wont actually show.
you can't do startergui it has to be playergui
You can do StarterGui but it only applies when anyone re-spawned
nframe is actually in StarterGui, so if its default Visible was True then the second 'if' is actually useless