Player as a Table to animate

You're asserting self.playerTable but on the previous line define just playerTable

Also, it might be easier to use this: Lightweight AnimatedImage Library to achieve your goal.