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

Double click on the timeline: