LoadCharacter kicks some players from the game

Whenever LoadCharacter is used on a large group players, some of the players are often kicked from the game with this message:

It doesn’t happen all the time, and almost never happens when the players are all killed simultaneously and respawn at the same time(as far as I know).

The only way I know to reproduce this is to:

  1. Have around 10-15 players join a game.
  2. Use LoadCharacter on all players in that game.
  3. Repeat until occurs.

I’m not entirely sure when this started. It has been around for a few months now.

2 Likes

What I’ve also noticed about LoadCharacter when I used it for a game is that players tend to spawn without their clothes after LoadCharacter is called. I have no idea as to what causes this but I did notice that it was only occurring when there’s numerous players in the server.

This happened to me when I was calling LoadCharacter from numerous touch events.

Try adding a debounce to see if it fixes your issue.

It’s from a respawn button I had set up though. Nobody was spamming the button when I experienced it so I’m not sure if a debounce would help it. Thanks though.

1 Like

This has happened multiple times to me and several other players in games that respawn a player using :LoadCharacter(). In a war clan that I am in, if I respawn the players (30 players; max server size), some will get disconnected from the server due to everyone spawning at the same time. Usually I would have to use a “:kill all” command to prevent that from happening.

It’d be nice if this was fixed in the future as this has been happening for a few months.

2 Likes

LoadCharacter() put someone else’s clothes on me before I got my own.

As for this issue, it tells me I lost connection instead of whatever message is in the OP. Thing is, my internet will be fine yet it says connection was lost.

Yeah, there have been a few other problems with LoadCharacter as well.

These are some serious allegations without much evidence. If character spawning causes a disconnect that’s obviously a huge bug that needs addressing asap.

I run a game that involves using LoadCharacter a lot and have yet to experience this issue. I want to see a repro or hear if any large game experiences this.

The other day I helped @EmeraldSlash figure out he was spamming it. Ensure this is not the issue in any of your cases.

1 Like

It isn’t being spammed. In one of the games for a clan, whenever the flag
activates (usually once per server), there’s almost always 2-3 players that
are removed from the game.

This also happens in other places(most of which can be found in clan
forts/training places) when the round starts, and everyone is respawned to
be put on the map.

I’ll try to get a few videos of when it occurs.

You should include a place in which this happens, so it can be looked into. Personally though, I’ve never experienced this and I use LoadCharacter frequently.

It usually only happens when you do it on a large group of people. One of the places it happens is here:

LoadCharacter is still being called a number of times - although it is on different players so it shouldn’t affect anything unless LoadCharacter has a way of being connected to something global.

He was saying that in his game he doesn’t have any issues even when using it extensively.

This might be part your issue. Given that only a few players get kicked, I’m assuming it’s due to their low-end networks/devices being unable to deal with the sudden amount of traffic. Characters take up a lot of memory; their hats, body parts and textures certainly aren’t cheap. Multiplying this by the number of players in the server and then also taking into consideration that you’re manipulating the gameplay map at the same time, I can see some clients being unable to keep up with all that data manipulation at once.

You should probably split up these tasks and see if the issue persists.

Yeah, but that wouldn’t really explain why the same problem doesn’t happen when they are all killed and respawned at the same time. Also it usually happens to different people each time.

a non-forum member wanted me to post that your chances of being crashed increase while having a tool equipped. which accounts for a lot of reason why clans crash from games on respawn.

1 Like

Yeah, @Kuas did a report on this here: Client shuts down when tool equipped during respawn