Replicated storage to player gui issue

Hey developers, I’m currently stuck on an issue regarding where to put my scripts that interact with the player’s GUI. Usually, I would put it in starter GUI in a separate folder, however recently I’ve been cloning all my UI elements from replicated storage in hopes of saving Memory usage in my game.

Everything was going fine as I put my scripts in replicated storage and cloned them into the player’s starter GUI until I realized that every time the player dies it wipes all the cloned elements from the starter GUI. I fixed this by re-cloning all the scripts and UI elements every time a character dies however I’ve come to realize this isn’t efficient and could cause strain on the memory usage.

Any suggestions on were I could store my scripts? I’ve tried starting player scripts but all the variable references in the script become nil because of the Ui’s being wiped every time a player dies

Try turning off the ResetOnSpawn property for the ScreenGuis so that it will not be removed from the PlayerGui container each time the player’s Character respawns.

Thank you! I just realized that if my guis are in folders then they will still be wiped. Is there any workaround to this whilst keeping it organized?

1 Like

Oh that’s an issue that has been around for a long while, but fortunately, I found a workaround for that a couple years back:

1 Like

I find it unfortunate that this is still a lingering problem after all these years. Hopefully, they decide to do something about this shortly. Thanks anyway!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.