This has started happening in the live version of Bee Swarm Sim, except it also affects scripts that are immediately in StarterGui. A LocalScript in StarterGui that’s responsible for setting up the GUI/Menus will run again every time the character respawns, causing duplicates of elements and generally breaking the menu system. This doesn’t happen in studio, however. Not sure how to go about fixing it but it’s pretty game breaking.
Edit: I also think it may be re-initiating module scripts in ReplicatedStorage. I tried to prevent it from re-running scripts by checking for a flag stored in a ReplicatedStorage module script and it doesn’t seem to save.
I’ve checked a few other games and the only other one that seemed to be affected was Super Power Training Simulator. If you respawn, none of the buttons on screen work and you can no longer open the menu (similar to Bee Swarm Sim).
If you put a LocalScript in StarterGui that prints a message, it will print it every time you respawn in the release version (not in studio).
If you put a LocalScript into a ScreenGui within the StarterGui, it will print the message twice upon entering the game, as if it’s ran twice (also not replicated in studio). This happens regardless of if the ScreenGui has ResetOnSpawn enabled or not.
Edit: The second problem is only happening with some LocalScripts and not others, trying to figure out the difference…
The script always printed every time (and it also prints every time in studio). I think this is the expected behavior if StarterGui.ResetPlayerGuiOnSpawn.
If you have an rbxl file that reproduces the second issue can you post it on the thread or DM it to me?
Oh! I was setting StarterGui.ResetPlayerGuiOnSpawn to false in a LocalScript in the StarterGui (it’s been that way since the release of the game). My guess is it was working for so long just accidentally and a change behind the scenes has caused it to stop. Setting it to false directly in studio direct fixes the problem. Thank you!
So the change that was made that causes the issue in bee swarm simulator is now the PlayerGui is reset on the server, not the client. Because of this change setting StarterGui.ResetPlayerGuiOnSpawn to false in a LocalScript no longer stops the PlayerGui from being reset when the character spawns.
It looks like the issue in your game is probably caused by the same change but is a bit different. We should be able to try turning off this change to see if it fixes the issue when people in the office wake up.
It’s a different property from ResetOnSpawn - in my case I was setting StarterGui.ResetPlayerGuiOnSpawn to false in a LocalScript, and it seems like that doesn’t work anymore. Using a server script or just with the command line in Studio (it’s not exposed as a tick box) fixes it though.
The Gui Duplicates for some reason, so the script is still running, the old UI is still there but the new UI’s button is blocking input to the old one causing it to not fire MouseButton1Down event
I’m not sure exactly why the behaviour is different from what happened previously but what is happening seems to be that you have a script in ReplciatedFirst that copies these two ScreenGuis from StarterGui to PlayerGui. Then when your character is spawned the PlayerGui is not reset and these are still copied over.
A way you can fix this temporarily in your game is to instead copy these GUIs from ReplicatedStorage to PlayerGui and remove them from StarterGui.
Ah I see, I wasn’t fully sure what exactly your game was doing. This makes sense, since PlayerGui is now copied over on the server the ScreenGuis will still be copied over (they are still in StarterGui on the server).
I have forwarded this thread on to the engineer responsible for this feature.
Do you get another duplicate as your character respawns a second time? Also what do you use as a trigger to copy in the above localscript to reparent the 2 guis to the PlayerGui?
No, it happens the first time, I used Player.CharacterAdded to check if it fires twice but it only printed once, and after I reset it doesn’t create more duplicated GUIs
Nothing, it runs as soon as it can, this script is inside ReplciatedFirst
Yes, as TheGamer101 mentioned, the Guis are loaded because they are now copied on the server then replicated to the client instead of copying from the local client copy. And since the parent action happened on the client, the server’s copy is still existent because this reparent action is not replicated back to the server; therefore creating that second copy. (Please note that ResetOnSpawn is effective on respawn and not the initial spawn).
If you place these GUIs in ReplicatedStorage then reparent them to the playerGui, this should stop that from being duplicated.