Struggling with a "spawning animation"

So, one ability in my Pulp adventure game allows you to place a tile in front of you (think similar rules to the Cane of Somaria. The exact logic behind the placement isn't important for this question, but there should only ever be one on-screen at a time). However, I'd like to polish it up before moving on to other abilities.

My goal is to have the tile play a short spawning animation before settling on its final frame (or something to that effect, at least), but all attempts to do so have ended in a freeze/crash that I was never able to fix.

I've mainly been trying something with a while loop but I must be missing something important. I'm sure the solution is something way simpler than whatever I was trying but I'm quite new to this.

have you tried this function Playdate PulpScript ?