# Variable going between 0 and the value it should be every frame

**URL:** <https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [August 17, 2025, 10:35pm UTC](https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167 "2025-08-17T22:35:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![monkpotter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monkpotter](https://forums.unrealengine.com/u/monkpotter)\
**Post date:** [August 17, 2025, 10:35pm UTC](https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167/1 "2025-08-17T22:35:18Z")

</div>

For some reason, my score variable is set to 1 on one frame, then 0 on the next, and then back to 1. Below are screenshots of code and the issue.

 ![Screenshot 2025-08-17 183214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/5/da5fa3ec74e625f56e20cf414aaa3c6203a3c993.png)

---

<div class="post-metadata">

**Author:** ![monkpotter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monkpotter](https://forums.unrealengine.com/u/monkpotter)\
**Post date:** [August 17, 2025, 10:35pm UTC](https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167/2 "2025-08-17T22:35:57Z")

</div>

Here’s a screenshot of the the variable being printed every tick  
 ![Screenshot 2025-08-17 183434](https://d3kjluh73b9h9o.cloudfront.net/optimized/4X/3/5/e/35eb2be556dc3df704976c6090a88f348a6cd58e_2_48x500.png)

---

<div class="post-metadata">

**Author:** ![Ruffhaus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ruffhaus/32/1194663_2.png) [@Ruffhaus](https://forums.unrealengine.com/u/Ruffhaus)\
**Post date:** [August 18, 2025, 1:13am UTC](https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167/3 "2025-08-18T01:13:19Z")

</div>

Are you setting `P1 Score` anywhere else?

I don’t see how it could be getting back to 0 if the only time it is being set is as itself + 1

---

<div class="post-metadata">

**Author:** ![monkpotter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monkpotter](https://forums.unrealengine.com/u/monkpotter)\
**Post date:** [August 18, 2025, 12:28pm UTC](https://forums.unrealengine.com/t/variable-going-between-0-and-the-value-it-should-be-every-frame/2645167/4 "2025-08-18T12:28:10Z")

</div>

I call it to update the UI but I never set it anywhere else. That’s why I’m so confused because it seems like it shouldn’t be doing that but it does
