# How to load client's variables after joining a session

**URL:** <https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916>\
**Category:** Blueprint\
**Tags:** client, gamestate, unreal-engine, Blueprint, question\
**Created:** [April 21, 2016, 8:46am UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916 "2016-04-21T08:46:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thura\_Oo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thura\_Oo](https://forums.unrealengine.com/u/Thura_Oo)\
**Post date:** [April 21, 2016, 8:46am UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916/1 "2016-04-21T08:46:54Z")

</div>

Hello everyone. I’m having trouble with loading client variables (which are saved before joining a session) after joining a session. I’ll explain my problem first.

I’m writing a 2 player fighting game with blueprints.  
I saved client’s name, hero name, etc variables into a gameState blueprint before joining the session.  
But after joining the session, when I load them back, all the variables saved in the gameState are reset.

Can anyone help me how to save variables of client ( which are set before joining session ) and load them after joining session.

---

<div class="post-metadata">

**Author:** ![CriErr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CriErr](https://forums.unrealengine.com/u/CriErr)\
**Post date:** [April 21, 2016, 12:29pm UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916/2 "2016-04-21T12:29:04Z")

</div>

You should save those kind of variables in Game Instance. This object does not get reset after map changing .

Also, On Post Login you could send request to client, with name and stuff and client would send it back to server when request received.

---

<div class="post-metadata">

**Author:** ![Thura\_Oo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thura\_Oo](https://forums.unrealengine.com/u/Thura_Oo)\
**Post date:** [April 21, 2016, 1:38pm UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916/3 "2016-04-21T13:38:53Z")

</div>

Thank you for your answer. I’ve tried with game instance but it doesn’t succeed. I’ll explain what is happening exactly.

For example, we have two players, so

Server has a game instance where name = “gg”.

Another player (before joining session) also has a game instance where name = “John”

but after joining session, there is only one game instance left and whenever I called a variable from game instance, it answers “gg”.

I really want to know is how can I save the variable set to “John” and load it after joining session. Or any other ways to solve such problems.

---

<div class="post-metadata">

**Author:** ![CriErr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CriErr](https://forums.unrealengine.com/u/CriErr)\
**Post date:** [April 21, 2016, 1:45pm UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916/4 "2016-04-21T13:45:19Z")

</div>

That’s weird. So, save game maybe?

After Selecting name and stuff, save it to file and load the file after joining session…

---

<div class="post-metadata">

**Author:** ![6r0m](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/6r0m/32/1194563_2.png) [@6r0m](https://forums.unrealengine.com/u/6r0m)\
**Post date:** [August 2, 2019, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916/5 "2019-08-02T18:02:42Z")

</div>

no, GI persist on the client, add delay after PostLogin controller event

 ![283971-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/c/55c3618a78948065aecc20e85bc79f1269fb9708.png)
