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

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

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

✓ Accepted answer

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.

3 comments

0

Ope- I think you might be right hold on

0

I seemed to have fixed it, I guess you were right the ExitButton was not fully disabling the GUIs. Thanks!!

0

your welcome!

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