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

How can i make a script in a GUI that opens another GUI?

Asked by 7 years ago

I tried closing the first GUI with script.Parent.Parent.Parent.Visible = False and then opening the other GUI, but nothing i tried worked.

0
Do Enabled = false rather than Visible = false, if the gui's transparency is only changed then the player will not be able to click where the gui is. VeryRaven 85 — 7y

3 answers

Log in to vote
0
Answered by 7 years ago

In a localscript, use the path game.Players.LocalPlayer.PlayerGui... to wherever the GUI is instead of finding the Parent of the script.

Also the Visible = False should be a lowercase F: Visible = false

0
Sometimes, i just find doing .Parent faster than game.Players.LocalPlayer.PlayerGui. Either way works. hiimgoodpack 2009 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

This is very easy when you understand it. Use the command not.

 script.Parent.Parent.Parent.Visible = not script.Parent.Parent.Parent.Visible

not will reverse Visible if it is false or true

Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
7 years ago

ScriptingHelpers.org is NOT a request site.

Answer this question