# Player array in the game state has the wrong player state classes

**URL:** <https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383>\
**Category:** Multiplayer & Networking\
**Tags:** gamemode, playerstate, gamestate, unreal-engine, Multiplayer, question\
**Created:** [March 20, 2018, 6:20pm UTC](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383 "2018-03-20T18:20:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_aa967a7a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aa967a7a](https://forums.unrealengine.com/u/anonymous_user_aa967a7a)\
**Post date:** [March 20, 2018, 6:20pm UTC](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383/1 "2018-03-20T18:20:07Z")

</div>

As explained in the title, when calling “player array” from my custom game state I don’t get the classes I’m supposed to get. I have:

- DeathMatchGameMode (child blueprint of my BasicGameMode which is a child of GameModeBase)
- DeathMatchGameState (child of GameStateBase)
- DeathMatchPlayerState (child of BasicPlayerState which is a child of PlayerStateBase)

I checked to have correctly set my game mode and its defaults

 ![234436-screenshot-98.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/d/12d944d3ad1b1c849b333a2160a464711284ccf3.png)

But on the server it still has the player state that I had in the previous level (which has a different game mode with different classes) and trying to print the player state class name (using a switch on authority node to differentiate between server and clients) confirm that on the server the clients don’t have the right class

![234437-screenshot-99.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/5/4f53e9202e0247265ccc3905eccdd6bb7704e11f.png)

That said, on the clients they do have the right class but they often don’t have other’s client references

![234439-screenshot-100.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/5/4f552662bd8c2bfdaf027c02fc342948c7eed017.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aa967a7a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aa967a7a](https://forums.unrealengine.com/u/anonymous_user_aa967a7a)\
**Post date:** [March 25, 2018, 5:15pm UTC](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383/2 "2018-03-25T17:15:51Z")

</div>

I think I found the problem: I didn’t let the engine load and replicate the new objects.

A simple delay of half a second was enough to load everything properly.

---

<div class="post-metadata">

**Author:** ![Rizzist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rizzist](https://forums.unrealengine.com/u/Rizzist)\
**Post date:** [March 25, 2023, 7:11pm UTC](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383/3 "2023-03-25T19:11:41Z")

</div>

+1 thx for the answer saved me hours of work 🥲
