StarterGui's contents are not always passed to my players

This bug started around 24 hours ago. What happens is some players sometimes spawn into my lobby place and they never get the contents of StarterGui. I can confirm this because I’ve loaded up my lobby GUI with a bunch of prints, and their console looks like this:

When it should look like this, at the very least SOME output generated by my code:

I have no way of replicating this, sometimes it happens, sometimes it doesnt. I can fix it for myself by cloning the lobby gui into my own PlayerGui, but I have no easy way of band-aiding this bug for everyone without messy stuff like cloning the gui into the player by hand if they dont communicate with the server after x seconds.

My lobby visits went up by 17%, while my actual game visits went down by 30%

Lobby game: The Conquerors 3 [ STEAMPUNK SKINS ] - Roblox

Note: I haven’t updated my game since 7/27, this bug just started happening out of the blue.

5 Likes

Started happening to me too. People load into the game without a Menu, instead they spawn with a blank skybox, respawning fixes it.

2 Likes

Problem is I dont have characters in my lobby, they are destroyed instantly, so there’s no respawning. It’s happening to you too. Figure it should have a robloxcritical tag?

1 Like

I do the exact same thing, I managed to make a workaround by delaying the character removal by 0.5 seconds, which I shouldn’t… not sure if this would be considered critical though… :thinking:

1 Like

I found a way around this by directly cloning the startergui’s contents to the player upon spawn. Moved the startergui’s contents to serverstorage so no redundancy.

2 Likes

I tried some simple tests with player gui, but I was not able to reproduce this issue. Have either of you had luck reproing this issue in roblox studio? If not, can you try to get server IP addresses from users who have observed this issue, so that I can try to inspect the server logs when this happened?

What about on my game? https://www.roblox.com/games/301549746/Counter-Blox-Roblox-Offensive

for some reason PlayerGui, doesn’t load. Even roblox control script, puts "Infinite yield possible on player:WaitForChild(“PlayerGui”) it takes a few minutes before playergui is actually inserted into a player

1 Like

@mightybaseplate above that is this error:

3.17234 1870: Warning: Something unexpectedly tried to set the parent of thebackup to NULL while trying to set the parent of thebackup. Current parent is PlayerScripts.

I have tried loading this place in studio & disabling the recent networking related changes that I know of and they don’t seem to make a difference

@Alkan, @BuilderAtWork, and @mightybaseplate:

I’m guessing you guys are all using custom characters or no characters? Can you try creating a model under StarterPlayer named StarterCharacter instead? I think this will solve your problem if it is what we think it is.

We’re talking about how to solve it for this specific use-case because a lot of old games still do it, but if you’re actively working on something there’s no harm in updating it to use this method.

1 Like

I destroy the character on spawn. I do nothing special with characters.

1 Like

I move my characters into ServerStorage on spawn, and parent them to the workspace anytime they are being used for gameplay

Try using an empty StarterCharacter.

For some reason, our engine only copies StarterGui->PlayerGui when the Character property is changed. This happens on the client in FilteringEnabled, so there is a good chance that the client never sees Character change because the networking code collapses property changes into the most recent change if they happen in quick succession. From the client’s perspective, Character = nil, then it receives an update saying “Character = nil” and it ignores it because it’s the same value. Thus, the PlayerGui is never filled out.

I am working on a revamp of this whole pipeline so you can do this without issue, but it’s nontrivial and somewhat risky. If you can get your game working well with an empty StarterCharacter, I totally recommend that. It’ll save your server some processing power too since it won’t bother requesting the player’s appearance and building them a character.

@BuilderAtWork: Your situation is a little more tough. I think for now, you could probably continue using the workaround mentioned above. I’ll keep you updated because it’s always best when workarounds are actually killed off when the problem is solved. :wink:

2 Likes

@0xBAADF00D I’m experiencing this issue in Love Notes and have implemented your workaround (Instead of destroying the character at startup, I use an empty model named StarterCharacter under StarterPlayer) which at least allows the scripts to be copied and the game to run.

Though I’ve used an empty model as StarterCharacter, a full character model (Head, Torso etc.) is being created for players as they join. This results in undesirable side-effects like walking sounds and death sounds when the player walks off the edge of the world. Is using an empty model for StarterCharacter supposed to result in no character model being constructed? That’s not my experience, even in an empty baseplate place.

Anyway, thanks for the workaround. I’m looking forward to the fix.

Huh, that’s interesting. I’m sure you could add an empty Script named “Sound” to solve that. I guess those are copied separately. I’ll talk to some coworkers tomorrow and see if it’s a good idea to change that.

This is still a problem, and I triggered it thinking it must’ve been fixed by now becase of this new error which means I might be having memory leaks: Parenting objects to PlayerGui from the server leaking memory

My hands are tied behind my back here, I can deal with no lobby GUI or potential memory leaks.

I just started having this issue in the past few hours. An empty StarterCharacter doesn’t help anything.

Can confirm, StarterCharacter stuff didn’t help me.

I’m sure I helped my situation by putting the GUIs in replicated storage and having one tiny script that tells the client to clone the GUI, but that’s still a waste of memory. And frankly an ugly hack, StarterGui working as its supposed to shouldn’t be anyone’s worry.

1 Like