# Bool not changing when i press a button

**URL:** <https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382>\
**Category:** Character & Animation\
**Tags:** boolean, bool, unreal-engine, question\
**Created:** [May 4, 2016, 4:48am UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382 "2016-05-04T04:48:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Creepercatss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Creepercatss](https://forums.unrealengine.com/u/Creepercatss)\
**Post date:** [May 4, 2016, 4:48am UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/1 "2016-05-04T04:48:03Z")

</div>

![89380-help.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/2/71287242a74bedd618c63e8f54cf01a5468bfb6b.png)

Like i said in the title when i press F in game it turns the light on and off but only plays one of the animations so i’m taking a guess that the bool is not changing, Thanks for any help in advance 😃

---

<div class="post-metadata">

**Author:** ![Dodgin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dodgin](https://forums.unrealengine.com/u/Dodgin)\
**Post date:** [May 4, 2016, 5:13am UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/2 "2016-05-04T05:13:45Z")

</div>

Do a → toString → Print String on the bool and you will see what the bool’s value is. I’d wager it’s something with the animation. Post your results and we’ll find out!

---

<div class="post-metadata">

**Author:** ![Creepercatss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Creepercatss](https://forums.unrealengine.com/u/Creepercatss)\
**Post date:** [May 4, 2016, 5:58pm UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/3 "2016-05-04T17:58:28Z")

</div>

Thanks for the reply! When i get home today i’ll try that. Thanks!

---

<div class="post-metadata">

**Author:** ![VictorBurgos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorburgos/32/1008648_2.png) [@VictorBurgos](https://forums.unrealengine.com/u/VictorBurgos)\
**Post date:** [May 4, 2016, 10:56pm UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/4 "2016-05-04T22:56:02Z")

</div>

Heh this is much easier than that… you have the bool defaulted to False, so it will always execute to **FALSE** on the branch unless you are setting that bool somewhere else to **TRUE** , which I doubt you are. What you could do, since it’s a toggle, is use a toggle node 😉 It’s called [FlipFlop](https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/FlowControl/#flipflop).

If this has resolved your issue, please upvote and mark as the answer so we can close this out properly. Good luck!

---

<div class="post-metadata">

**Author:** ![Creepercatss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Creepercatss](https://forums.unrealengine.com/u/Creepercatss)\
**Post date:** [May 4, 2016, 10:59pm UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/5 "2016-05-04T22:59:03Z")

</div>

![89470-blueprintfalse.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/6/6a6cf52b13c6f39c11d09fd6f08c635d0a799753.png)

Here is the blueprint script and the print that happens in the game when i press F, It just keeps reading False, False, False ect… So any help would be amazing. Thanks 😃

---

<div class="post-metadata">

**Author:** ![VictorBurgos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorburgos/32/1008648_2.png) [@VictorBurgos](https://forums.unrealengine.com/u/VictorBurgos)\
**Post date:** [May 4, 2016, 11:00pm UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/6 "2016-05-04T23:00:41Z")

</div>

Look at my answer and accept it:)

---

<div class="post-metadata">

**Author:** ![Creepercatss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Creepercatss](https://forums.unrealengine.com/u/Creepercatss)\
**Post date:** [May 4, 2016, 11:05pm UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/7 "2016-05-04T23:05:23Z")

</div>

Thanks man 😃

---

<div class="post-metadata">

**Author:** ![Dodgin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dodgin](https://forums.unrealengine.com/u/Dodgin)\
**Post date:** [May 5, 2016, 12:18am UTC](https://forums.unrealengine.com/t/bool-not-changing-when-i-press-a-button/356382/8 "2016-05-05T00:18:31Z")

</div>

Next time you have a question be sure to show the blueprint and properties. It helps helpers out a ton 🙂
