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?
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.