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

GUI won't show up after being exited only once?

Asked by 2 years ago

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)

1 answer

Log in to vote
0
Answered by 2 years ago

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.

0
Ope- I think you might be right hold on SamZeKat 28 — 2y
0
I seemed to have fixed it, I guess you were right the ExitButton was not fully disabling the GUIs. Thanks!! SamZeKat 28 — 2y
0
your welcome! Hi_People1133 218 — 2y
Ad

Answer this question