Scripts and UI resetting on respawn

  1. What do you want to achieve? I want scripts and UI to not re-run when a player respawns.

  2. What is the issue? Scripts and UI re-run when a player respawns. (To note, all scripts and UIs are inside StarterGui).

  3. What solutions have you tried so far? I’ve tried looking for solutions on the DevForum, and only found the “resetonspawn” tip. I could set ResetOnSpawn to false for all my UI, and manually reset it based on previous values in a script, but it seems like the scripts reset as well. I’ve come to this conclusion because of the fact that music starts playing and the UI resizes itself.

Thanks for any help!
:slightly_smiling_face:

1 Like

theres a property of gui’s that is called “ResetOnSpawn”, check that

If anything is cloned into the PlayerGui everything will reset when the player dies

Read it again, the OP tried to do that and it doesn’t work.

I edited my post and read it again

The OP did that according to the post.

If you’re having a problem with UI’s resetting, make sure to make it so that the scripts run once, so when the intro has completed it’s cycle, the script will disable, and it will destroy the UI from PlayerGUI