Please show what you have actually done (i.e. show us your actual code snippets), and give other information (e.g. the version of PsychoPy you are using- relevant as some online loop issues have been addressed recently: Cannot exit loop in online Pavlovia (Using JS code component)).