I have a scene with a looping animation and a button which on press moves on to a new scene. how can I ensure the looping animation finishes its current loop before moving on to the next scene? (and doesn't just jump to the new scene mid loop?)

any tips appreciated

thnx