# Clean way to get variables from game instance to server?

**URL:** <https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681>\
**Category:** Multiplayer & Networking\
**Tags:** gameinstance, gamestate, unreal-engine, Multiplayer, question\
**Created:** [July 2, 2021, 4:37pm UTC](https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681 "2021-07-02T16:37:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maffinius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maffinius/32/546414_2.png) [@Maffinius](https://forums.unrealengine.com/u/Maffinius)\
**Post date:** [July 2, 2021, 4:37pm UTC](https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681/1 "2021-07-02T16:37:56Z")

</div>

Hey all,

iam trying to get a simple integer from the game instance to the game server when/after loading the main level. But it seems like iam doing something fundamentally wrong (i guess) because nothing i have tried works. The player- /gamestate is not valid on clients or the function iam trying to get the value simply doesn’t execute for some reason so nothing happens at all. Or i get a value but from the wrong gameinstance.  
Is there a simple way of getting an integer (or any other information) from all clients game instances to the gamemode/gamestate?

Thanks for any input iam lost since a week now!  
M

---

<div class="post-metadata">

**Author:** ![Maffinius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maffinius/32/546414_2.png) [@Maffinius](https://forums.unrealengine.com/u/Maffinius)\
**Post date:** [July 12, 2021, 12:00pm UTC](https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681/2 "2021-07-12T12:00:14Z")

</div>

Closing this for now. I studied the network compodium from Alex Neukirchen and figured out i called some events on the wrong side (gameinstance on server side for example). Now it works as expected.
