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

How to have another GUI open as soon as another is closed?

Asked by
Detzky 0
7 years ago

This is the code I have right now,

function onClicked()
    script.Parent.Parent.Visible = false
end
script.Parent.MouseButton1Click:connect(onClicked)

That is the code that will make the current GUI turn invisible when you press down on the "Play" option anyway , my question is would I have to add a "then" into the script to have the other GUI who is also a Child of the Frame to somehow turn visible when you press the "Play" textbutton?

0
Use the .Changed event to detect when a gui is turning invisible (Visible = false) to start a function that reveals another. StoIid 364 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Simplest way I can think is you can just make the other one's visibility equal to true in the same function, right after the other's visibility is set to false, being as the function only activates when script.Parent is clicked.

Ad

Answer this question