# need help with setting variables between blueprints

**URL:** <https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121>\
**Category:** Editor Scripting\
**Tags:** savegame, add-variable, unreal-engine, Blueprint, question\
**Created:** [June 20, 2021, 10:03am UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121 "2021-06-20T10:03:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![N0T\_A\_SWEAT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/n0t_a_sweat/32/88714_2.png) [@N0T\_A\_SWEAT](https://forums.unrealengine.com/u/N0T_A_SWEAT)\
**Post date:** [June 20, 2021, 10:03am UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121/1 "2021-06-20T10:03:10Z")

</div>

so im working on a save and load where i have a savegame object and gameinstance. i dont know what im doing wrong but i cant set the variable from the savegameobject. it stays at 0 even tho i set it to 100.  
[![Imgur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/b/78b4000d00baf91496199ab07b5f2aa816a577f7.jpeg "imgur.com") ](https://imgur.com/MCBLW9m)  
[![Imgur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/f/b4f28b1365260e3158da939a185f1a8b8b6fc5b2.jpeg "imgur.com") ](https://imgur.com/gllbz4u)  
[![Imgur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/7/80781822d8bf78bc34981b4390e980bf5d525ad9.jpeg "imgur.com") ](https://imgur.com/lmHWnuY)  
[![Imgur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/6/1f621a7aee12fed697cf985fde1d94c101786855.jpeg "imgur.com") ](https://imgur.com/wSVizWD)  
[![Imgur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/b/e3b9bd87dd6970366a848f3c9a1bdbb597971fbc.jpeg "imgur.com") ](https://imgur.com/MaD71Xz)

EDIT: i fixed it

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 20, 2021, 2:48pm UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121/2 "2021-06-20T14:48:29Z")

</div>

It’s probably this:

 ![341909-screenshot-7.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/a/17aa08a7f1416433715860c2f4489705bbcde4dc.png)

It seems you load data, but never assign it; it should be close to this:

 ![341908-screenshot-6.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/f/67f765f3b25aefc255fa6906b27e3a97520d2a72.png)

The _Loaded Data_ = yours _Savegamedata_

---

<div class="post-metadata">

**Author:** ![N0T\_A\_SWEAT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/n0t_a_sweat/32/88714_2.png) [@N0T\_A\_SWEAT](https://forums.unrealengine.com/u/N0T_A_SWEAT)\
**Post date:** [June 20, 2021, 7:30pm UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121/3 "2021-06-20T19:30:06Z")

</div>

im not able to get the variable from that return value tho

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 20, 2021, 7:34pm UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121/4 "2021-06-20T19:34:05Z")

</div>

What do you mean? You’re even showing the variable in the 2nd screenshot… Can you show how you’re doing it?

After loading and casting assign the value to Savegamedata → Get Current Stamina Object float. You’ll need to cast to your type first, ofc. The loader does not know what it’s loading.

The official docs demonstrate it pretty well:

 ![341924-screenshot-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/8/a984398a18c2f32efc83423d8a58311a69e85eb3.png)

But do assign it to the variable after casting since you may want to use it later.

---

<div class="post-metadata">

**Author:** ![N0T\_A\_SWEAT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/n0t_a_sweat/32/88714_2.png) [@N0T\_A\_SWEAT](https://forums.unrealengine.com/u/N0T_A_SWEAT)\
**Post date:** [June 20, 2021, 8:03pm UTC](https://forums.unrealengine.com/t/need-help-with-setting-variables-between-blueprints/485121/5 "2021-06-20T20:03:29Z")

</div>

yeah ik it demonstrates it well. but i fixed it, later i understood what you meant so thanks for ur help man i really appreciate it
