LoadCharacter() hogging server resources

How many people need to have their characters loaded at once before this becomes an issue?

I think your issue may not be related to LoadCharacter and instead be related to sound loading. I have PMed you more details.

1 Like

The example on the wiki says Player:LoadCharacter() (which is false not true)

The inGame parameter defaults to true.

1 Like

If you LoadCharacter an entire server ( ~ 20 players ) the server will freeze for about 20 seconds until all characters are respawned

2 Likes

Hello darkness my old friend

one vertical bar=100ms. I just loaded up a baseplate and ran the stuff in the command bar. This is a test server.

3 Likes

I’ve come to talk with you again.

I took a look into this again and found this in the microprofiler when LoadCharacter is called:

This issue is still causing massive performance losses at my games, and the original post seems to prove that it’s out of my control entirely. I think I successfully got a dump of this but I’m not entirely certain how to get to it, if it would be beneficial for debugging this issue then I can upload it here.

5 Likes

Ok I just found out that this is also causing massive issues in Aegis, and I only narrowed it down today… This needs to be resolved, for now im going to just kill the humanoid… Firing it once causes a 50% spike in server usage, and you can clearly tell when its being fired as the lag spike is crazy…

2 Likes

Ping @CodeWriter @TheGamer101 - I thought we resolved this but maybe not.

2 Likes

I also thought that we had resolved this issue, can you provide more information about what issues you are seeing and a way to reproduce them? Are the performance issues you are seeing on the client or the server? Does your game use R15 or R6 avatars?

We have made some significant changes to LoadCharacter since this thread was initially posted so hopefully there aren’t still performance issues related to character loading.

1 Like

R15, 100% server side, replication of everything pauses because of the CPU usage spike in those few frames. The only thing I can tell is that the issue scales with player count. Il see what I can do about a easy repo for you guys. With around 45 players, the spikes are around 50%, less players uses less usage. Running the code in the first post causes the same results in my game that TwentyTwoPilots is seeing in his post 13 days ago.

1 Like

My game relies on LoadCharacter for respawns due to a custom death situation, and it hogs over 50% of the memory, causing a lag spike. Is this still an issue to date?

1 Like

LoadCharacter() is still causing issues… any fixes?

7 Likes

LoadCharacter() continues to create large lag spikes on occasion when used. Is anyone out there?

6 Likes

Yea, this is SUPER annoying.

In both No-Scope Sniping and it’s remake, I use a custom character spawning script that uses LoadCharacter. At the end of a round when this is called in mass, the server dies for a second.

I’m a bit upset that 4 years later, Roblox still hasn’t fixed this bug.

3 Likes

This is an incredibly old bug that needs fixing! I’m ashamed of the Roblox engineers, seeing that this is still around and is causing MAJOR issues.

5 Likes

Almost 2021 and I am still having this bug, still not fixed yet.

2023 and the server still dies for a sec when character loads. (Just ignore this bump if you don’t like it, hopefully no one whines about this.)

edit: oops i meant 2023, not 2022

3 Likes

When I’m testing this using the same method, I’m getting spikes up to about 10ms when respawning but nothing crazy like the above, leading me to believe it was fixed at some point. Check your CharacterAdded events for other problems.

ive tried to make characteradded into command and it still does it. probably just network stuff or roblox not handling physics correctly.