Players Crashing after Teleport when Loading Screen ends

Link to game: The Creeps!🎃 - Roblox

When a player starts a round of the game they often crash when the custom loading screen disappears. I’m not sure why this is happening as my scripts on the server and client have a very low activity rates (the highest on the client is 0.5%) and low rates. When the game does work it functions very smoothly and ping is extremely low. The crash rate varies between 5-10% at the destination place and is usually around 0.5% at the Lobby. It was slightly worse before and the game was much more slow running on the client but I managed to resolve that by getting rid of a script that mysteriously had a 1-2% activity and 1600/s rate, for some reason forking the RbxCharacterSounds script in StarterPlayer by replacing with an empty script to get rid of character sounds resulted in slowing the client. I’ve been trying to get the crash rate below 1% but I’ve been at it for over a week and it seems impossible by this point as I have no clue what is causing the game to randomly crash which happens the instant I remove the loading screen or sometimes at a later point.

When players start a round in Night 1 their camera will be stuck at the beginning of the opening cutscene, this is what they see:


^ Image of game CRASHING (Destination Place)
The camera freezes and they are unable to close the window.
Players also crash frequently when teleporting to other nights as well. Players can crash when the loading screen disappears, after a few seconds, and sometimes later on in the game.

There are very few scripts that get activated at this specific point in time.

I’m not sure if this is related, but CharacterAutoLoads is disabled in both the game and the lobby. For some reason I was experiencing an issue in the lobby where players wouldn’t load in properly and their camera would just be stuck floating under the map of the lobby. They don’t crash, but this is all they would see.


^ NOT A CRASH (Lobby)
Apparently after this type of bug starts according to these people When I go in my game, my character doesn't load, camera is frozen the only way to fix this issue is by making a new game and transferring everything over to it. However I managed to sort of solve the problem by disabling CharacterAutoLoads in my game and firing a remote even from the client when they join and then the server loads their character (yes I used a pcall and did it repeatedly with a “wait” until it works)

I’ve had this issue of players camera’s being stuck and their characters not loading with other games of mine in the past and each time I encounter it I descend further into madness because it just happens randomly when some players join and feels like something out of my control since it’s related to the way characters/players are loaded into the game. Idk if that issue is even related to why the crashing is happening in the actual destination place.

Here is a clip showing the activity of the scripts at the destination place. It never crashes in Studio mode.
https://streamable.com/yo0vqr

Anyways after releasing my game and spending a week straight on this one issue I’m at a complete loss of what to do as it seems impossible to bring the crash rate down to normal levels.

Here are a few of the things I’ve tried so far:
Using the DevConsole to find high activity server sided scripts that start at the point where the game stops loading.
Making those server sided scripts start after a delay rather than right when the game starts.
Using the Script Performance viewer in Studio to find high activity scripts and improving on those.
Copying and pasting everything into a new Place for the destination place and teleporting players there instead.

It hasn’t crashed a single time in Studio.

3 Likes

I’ve also been noticing this issue since my Trade World (which uses TeleportService) got added to my game. Client crash rates seemingly doubled. (My cursor was when we added it)

2 Likes

Interesting, is that the experience crash rate or the crash rate of just the destination place? Do you know if the crashes happen as the loading screen ends or just at random points? Mine tend to mostly happen right when the loading screen ends.

1 Like

Not 100% sure if its related, its just that the only thing I did to the game was enabling the portal to the trade world, and my average crash rate went from ~4.49% to ~8.87%.

But that kind of jump is preposterous for the small percent of players that would use the trade world so :man_shrugging:.

2 Likes

What is memory and network recv like during the loading screen?

1 Like

Memory is around 1-1.2k on the client:

Memory on server:

Network Client:

Network Server:

Can you check network recv from the ctrl(+shift)+f7 menu?
If it’s constantly high, that could be the cause of crashes.

https://streamable.com/x4ce7j
https://www.youtube.com/watch?v=riUdMaqEUhM

Thanks for the report! We’ll follow up when we have an update for you!

4 Likes

I’ve finally resolved this. The issue was that when a player gets teleported to the game I use DataStoreService’s GetAsync function to load some of their data. Other players arriving to the destination place while this is in the middle of happening seem to occasionally crash. My solution was to use TeleportData to pass the number of players being teleported to the destination place and then waiting until that many players arrive in the game or a maximum time has been reached. Once everyone arrives I load all of their data at once. This change has brought the crash rate down from 6-12% to 0-2.5% which has been maintained for an entire day now.

1 Like