How to create an animation for a mesh that loops and despawns at a certain point

yeah? if i ever get into video game development as a job i’d probably go for the level designer job