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