How to spawn every player as a random character in multiplayer?

Hello. I have a multiplayer game with multiple Player characters who all have different abilities. Now I want that at the start of the game, every Player is randomly spawned as one of these characters. How would I go about doing that? Thanks in advance.

Make an array that holds the character class templates and then use a random integer to get a random class from the array. Then you’ll need to plugin the class into “Spawn actor from class”

But how do the Players then control the characters?

The server has to use “posses” node (a good place to store the node is in “game mode”). The node assigns the player character controller to the created character (or a pawn).

Out of some reason only the character of the Server gets spawned