So I was making a game where you click a ClickDetector and a GUI pops up. To my surprise, if you close the GUI, and click the ClickDetector again, the GUI doesn’t pop back up. Here is my code for the ClickDetector:
How are you making the GUI disappear? I know it seems like a mundane question, but it could be the fact that you’re making it disappear in a way that doesn’t relate to the Visible value being set to false.
You’d have to put the script inside the door or inside ServerScriptService and then when someone clicks it instead of just doing Gui.Visible = true you have to fire a remote event to the client on a client side script that would simply do Gui.Visible = true. If you don’t add the remote event the script will only fire the GUI to be visible once, and never again if you repeatedly click it.
This is because when you first joins the game, the Server thinks that the GUI Visible is set to false. Then once you click the door, the Server makes the GUI Visible set to true. However, if you exit out of the GUI like pressing an X button to get out or whatever, and attempt to click the door, it won’t work because the Server still believes that the GUI visible property is set to true even though you made it false locally.