Element will not remove from array

Hi I’m making simple multiplayer BR type game where for testing, there are 3 players in the arena and last player left wins. Everything seems to be working great except for the code determining which place you get. The following code is in my gamemode blueprint.

The Player Died event is called from the character blueprint and passed with the player controller. What this is supposed to do, is set the placement to how many people are left alive, and then remove the player controller from the list of who is left alive.

I’ve used print statements and determined that it is not properly removing the elements from the array. If there are 3 players in the game, it works for the first player to die and removes the player from the array. But it will not remove any more regardless if the other players die.

I printed the Display Name for each element in the array and it shows:

`Cube_PC2

Cube_PC1

Cube_PC

Players alive: 3`

After the first player dies, it then shows:

`Cube_PC2

Cube_PC1

Players alive: 2`

After, this it will not change these values so when the next player dies:

`Cube_PC2

Cube_PC1

Players alive: 2`

Any thoughts on why this would be? Thank you for any help!

It seems that PlayerController from function input is always Cube_PC0, maybe the wrong controller is passed in the function?

Some thoughts on this:
You say, the event is in GameMode - so no need to do the SwitchHasAuthority here - GameMode only exists on Server by definition - but that’s not causing problems, just is not needed at all.
You say, that you call the PlayerDied event from the character BP: how do you call it? The GameMode is not accessible from clients - so this might be causing your trouble, because the event does not get called at all - you could run it as Server RPC to avoid this.