How to use timelines to animate 2d sprites

Hi there,
I’m working on a 2d game in unreal and am really struggling with how to properly time my 2d flipbook animations. An example would be when a character plays an attack animation; at the moment I use a delay set to the time of the frames, after which it switches back to idle. But I’ve read that delays are one of the worst way to do this, especially in multiplayer games (which I’m aiming for), I’ve tried to understand how to use timelines to run the animations once but every time I try it just doesn’t work. If anyone could help me understand how to do this properly it would be greatly appreciated!!

Thank you for your time