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

The gui keeps poping up even when i die.?

Asked by
Tizzel40 243 Moderation Voter
6 years ago

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?

0
Yep.. Had the same problem earlier. Just go into the ScreenGUI's properties, and make sure "ResetOnSpawn" isn't ticked. SBlankthorn 329 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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.

Ad
Log in to vote
0
Answered by
zblox164 531 Moderation Voter
6 years ago

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.

Answer this question