I have a click detector that opens up two GUIs when clicked, and it only works once. I can open up the GUI, interact with it, and close it. It works fine until i try to open it again. Instead of opening, it does nothing. There are no errors.
All scripts that interact with the GUIs:
Click Detector:
local Players = game:GetService("Players") script.Parent.ClickDetector.MouseClick:Connect(function(player) player.PlayerGui.BuyLighter.Enabled = true player.PlayerGui.BuyWeapons.Enabled = true end)
Exit Button in GUI
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Enabled = false script.Parent.Parent.Parent.Buy.Enabled = false end)
Hello,
In the first script you Enabled the Screen Gui but in the Exit Button Gui, you Enabled its descendants?. So first you Enabled the Screen Gui so it became visible but when you click the ExitButton it Enables a frame or something so it made it appear that that the ScreenGui is enabled but Instead the Frame was Enabled. You can check this when you join your game and check if the ScreenGui is Enabled or its Childs.
Feel free to ask questions.