I want to create a trial count/tracker that is visible to participant

Hello, I’ve set up an experiment where participants will hear an audio track then be able to type in what they heard. There are 160 sentences so I wanted to incorporate a trial counter/tracker that would be visible to the participant during the experiment so they can see how far along they are. So far, within my response routine I have a text component with $trials.thisTrialN inserted into the textbox. I got this code from a fellow student and it works great locally but doesn’t work online. If anyone has any ideas for fixes or suggestion on new solutions please let me know!

Any help is greatly appreciated!

Just set a variable at 0 in Begin Experiment and then add 1 to it in the trial routine. .thisN doesn’t work online unfortunately