# Dice Roll - WhileLoop Infinite Loop Issue

**URL:** <https://forums.unrealengine.com/t/dice-roll-whileloop-infinite-loop-issue/384753>\
**Category:** Audio\
**Tags:** roll, infinite-loop, unreal-engine, loop, Blueprint, question\
**Created:** [February 13, 2017, 1:46am UTC](https://forums.unrealengine.com/t/dice-roll-whileloop-infinite-loop-issue/384753 "2017-02-13T01:46:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![railerswim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@railerswim](https://forums.unrealengine.com/u/railerswim)\
**Post date:** [February 13, 2017, 1:46am UTC](https://forums.unrealengine.com/t/dice-roll-whileloop-infinite-loop-issue/384753/1 "2017-02-13T01:46:58Z")

</div>

I’m getting an infinite loop no matter what I try to do. I have a condition that is toggled by a condition for stop rolling. I have thrown in 100 second delays and it still hauls butt through the iterations of the loops! What the heck should I do? What am I possibly doing wrong!!!

For reference I’m trying to create a clone of Mario Party essentially.

 ![126026-forloopinfinite.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/e/5bed13b8aed2e9343019504de28affef017ffee7.png)

---

<div class="post-metadata">

**Author:** ![kurosu143](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kurosu143](https://forums.unrealengine.com/u/kurosu143)\
**Post date:** [February 13, 2017, 4:20am UTC](https://forums.unrealengine.com/t/dice-roll-whileloop-infinite-loop-issue/384753/2 "2017-02-13T04:20:56Z")

</div>

That while loop will not stop no matter what you do if you don’t remove the retriggerable delay. Because there is no bool modifier in the loop body.

To fix: don’t use while loop. use branch(stop roll) → delay(1) → setRollText → back to the branch(stop roll)  
NOTE: not retriggerable delay just delay
