Hey in my game I want the gui to be "Destroy()" but u see everytime when I die the gui comes back. Is there any way to prevent this?
COMMUNITY QUESTION
The gui keeps poping up even when i die.?
2 answers
Yes, assuming this is a ScreenGui what you can do is select the ScreenGui and make sure the property called ResetOnSpawn is OFF so that it doesn't reset the entire GUI on spawn.
For more information:
http://wiki.roblox.com/index.php?title=API:Class/ScreenGui
Note that ANY script and localscript inside the screenGui will RESET so it will run again.
Turn ResetOnSpawn to false.
Either set it in the properties menu or set it via Script. The ResetOnSpawn Boolean is set in the ScreenGui. Example:
local ScreenGui = script.Parent
ScreenGui.ResetOnSpawn = false
Make sure your using a LocalScript for doing any GUI work.
Hope this works for you.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Yep.. Had the same problem earlier. Just go into the ScreenGUI's properties, and make sure "ResetOnSpawn" isn't ticked.