Animation SOLVED!

but I don't know how to code the solution without breaking the game