Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 comment

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.

3 answers

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

1 comment

0

Sometimes, i just find doing .Parent faster than game.Players.LocalPlayer.PlayerGui. Either way works.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.