# Breaking Loops on Pavlovia

**URL:** https://discourse.psychopy.org/t/breaking-loops-on-pavlovia/22527
**Category:** Online experiments
**Tags:** pavlovia
**Created:** [April 23, 2021, 9:49am UTC](https://discourse.psychopy.org/t/breaking-loops-on-pavlovia/22527 "2021-04-23T09:49:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hanniballi](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Hanniballi](https://discourse.psychopy.org/u/Hanniballi)
#### Post date: [April 23, 2021, 9:49am UTC](https://discourse.psychopy.org/t/breaking-loops-on-pavlovia/22527/1 "2021-04-23T09:49:07Z")

</div>

URL of experiment: [https://gitlab.pavlovia.org/Nachwuchsforscher/sehendrehenverstehen3.git](https://gitlab.pavlovia.org/Nachwuchsforscher/sehendrehenverstehen3.git)

Description of the problem: Hi, I have a problem with the loop in my experiment. It runs smoothly in the builder, but on Pavlovia it doesn´t do breaks after 60 trails. (I have 3x60 and it should all be randomized).  
My code (which works in the builder) is shown in the picture.

I hope that someone can help me. Thank you in advance!

 ![Loop](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/1/e1520985c2bf9eb072d21e16345947e1befbacbd.png)

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [April 23, 2021, 10:25am UTC](https://discourse.psychopy.org/t/breaking-loops-on-pavlovia/22527/2 "2021-04-23T10:25:45Z")

</div>

Sorry, but loopName.thisN doesn’t work online (yet).

You should be able to change that code to Both and change ExperimentLoop to snapshot on the JS side.

---

<div class="post-metadata">

### Author: ![Hanniballi](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Hanniballi](https://discourse.psychopy.org/u/Hanniballi)
#### Post date: [April 23, 2021, 10:46am UTC](https://discourse.psychopy.org/t/breaking-loops-on-pavlovia/22527/3 "2021-04-23T10:46:17Z")

</div>

Thank you so much! That soved it.
