Animation will only play the first frame and then cut away

Why “would”? That code will interfere with it! Take a look here for a way to “solve” this: