Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this GUI open/close script, it only does half of the job?

Asked by 5 years ago
Edited 5 years ago

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)

0
:Connect not :connect AltNature 169 — 5y
0
make frame local seith14 206 — 5y
0
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. xPolarium 1388 — 5y
0
nframe goes to the startergui not the player's gui change it to like script.Parent -- Location seith14 206 — 5y
View all comments (4 more)
0
frame closes fine and works fine, but nframe wont open, it checks it visible but it wont actually show. Fluxzion -3 — 5y
0
you can't do startergui it has to be playergui MasonTheCreeperYT3 74 — 5y
0
You can do StarterGui but it only applies when anyone re-spawned User#17685 0 — 5y
0
nframe is actually in StarterGui, so if its default Visible was True then the second 'if' is actually useless User#17685 0 — 5y

Answer this question