"Two arrays" is indeed the right way to do it. You also need to have variables to compare the best lap time vs the current lap time when you pass the finish line. If current time is less than the best time, then copy the "recording" array onto the "playback" array. An easy way to do it is to use PlaybackArray.Load(RecordArray.AsJSON), and then you can reset the RecordArray and start recording anew.