Will the game have a dedicated server or just a listening server and a client (or more than one client)?
Just want to point out a few things about networking.
The player controller only exists on the server and the owning client. So the server will have a copy of all the player’s controller, but the client will only have their controller on their machine.
If there are three players
Player 1 (listening server) will have all three controllers on their machine.
Player 2 (client) will have their controller on their machine but not Player 3’s controller.
Player 3 (client) will have their controller on their machine but not Player 2’s controller.
So a client can not access another client’s controller.
The character/pawn and actors will exist on all machines.
If the variable TotalCl is something that all controllers need access to, it should be in the GameState (exists on server and all clients), GameMode (exists on server only, so it don’t replicate anything).
The GameMode could spawn the actors.
The GameState should hold the replicated variables, and it could also spawn the actors instead of the GameMode as long as the server is doing it.
The the client’s controller can access a replicated variable from the GameState.
Also I see your using a MultiCast Event to spawn.
Spawning actors, setting replicated variables, and DestroyActor should always be done on the server.
Actor’s Replication Settings:
NetLoadOnClient=true should make a copy of what the server spawns on the clients.
Replicate=true will allow variables to replicate in the actor blueprint.