# Game instance problem

**URL:** <https://forums.unrealengine.com/t/game-instance-problem/425326>\
**Category:** Blueprint\
**Tags:** game-instance, unreal-engine, UE4, Blueprint, question\
**Created:** [May 17, 2018, 12:46pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326 "2018-05-17T12:46:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_67eaea50](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_67eaea50](https://forums.unrealengine.com/u/anonymous_user_67eaea50)\
**Post date:** [May 17, 2018, 12:46pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326/1 "2018-05-17T12:46:36Z")

</div>

I want that when you pressed x it sets a variable to true in the game instance, but it isn’ t working. Any idea why is happening this?  
Thanks

 ![241325-captura-de-pantalla-2018-05-17-a-las-144131.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/9/60920b44aadd304c3bf4a98b6786edbfb66e2649.jpeg)

---

<div class="post-metadata">

**Author:** ![Nebula\_Games\_Inc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nebula\_Games\_Inc](https://forums.unrealengine.com/u/Nebula_Games_Inc)\
**Post date:** [May 17, 2018, 3:07pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326/2 "2018-05-17T15:07:07Z")

</div>

What is in the game instance? How do you know it isn’t working? Screen shot the game instance.

---

<div class="post-metadata">

**Author:** ![xRoci](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xRoci](https://forums.unrealengine.com/u/xRoci)\
**Post date:** [May 21, 2018, 9:10pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326/3 "2018-05-21T21:10:59Z")

</div>

Do you have the GameInstance set in your project settings?

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [May 21, 2018, 11:11pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326/4 "2018-05-21T23:11:50Z")

</div>

is the cast node being executed? if it is then check to make sure that it is running true, if its false then you need to set your game instance in the project settings under maps and modes. if the cast isnt being executed then you need to look farther back to make sure that the actor is set to receive input from the player, check to be sure the function you have is setup properly, and make sure that everything is executed at each step (make sure the branch is set to true).

---

<div class="post-metadata">

**Author:** ![TRI99ER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TRI99ER](https://forums.unrealengine.com/u/TRI99ER)\
**Post date:** [October 16, 2019, 8:02pm UTC](https://forums.unrealengine.com/t/game-instance-problem/425326/5 "2019-10-16T20:02:38Z")

</div>

Finally found solution to mine not working. And noone ever specified, you need to choose it in Project Settings. Thank you.
