I’m sorry, but there is another mistake. It crashes on 24 again, so I tried n = clamp(Math.floor(time/countDur), 0, walmart.length-2); and it loops between two last elements of the array. I can try with ending the comp before it crashes.
Thank you for your answer. It works but not 100% correctly. There is no limit for n so when there are no more elements in array, it crashes. “Class ‘aray’ has no property or method named ’24’.