Hello helpers, I've got a question, I've got an Intro GUI, but whenever you die the GUI shows up again, the close button has the following script:
function CloseGui() script.Parent.Parent.Visible = False end script.Parent.MouseButton1Click:connect(CloseGui)
I use visible instead because this won't do anything:
function CloseGui() script.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(CloseGui)
Pls help it's annoying to have the into GUI all the time
Script is inside a button, which is inside a frame, inside a screen GUI, inside the starter GUI.
I wouldn't use csmz's method, because you might want some GUI's to show after death, but not the intro GUI. You could simply use a bool variable or value that is enabled whenever you are done watching the intro, and then if the bool is true, it won't work.
local shown = false
You didn't give me the function that opens the GUI, but make it check for shown.
if (not shown == true) then -- code shown = true end
In the explorer, click on StarterGui, and in its properties youll see "ResetPlayerGuiOnSpawn" uncheck that, and you should be good to go!
Screenshots: https://gyazo.com/5a6a9b521a4ce0555666f729187fd28b https://gyazo.com/6c7a55011de8372c85d2e9972f457b8f