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

The gui keeps poping up even when i die.?

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?

1 comment

0

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

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.