Syncing sprite animations between server and client

I have a game which is sprite based, that is, the majority of the game is played with a GUI and various elements over your screen (think PP, PBB, etc.)

At certain points in the game, I need to display an animation and do some stuff when it completes, like deal damage. But since each player has their own version of the GUI, I’m not sure how to sync them in a way that prevents one player from holding up the rest, or some other weird behaviour?

What I was planning on doing is playing the animation on each client and then after a certain amount of time (like, the animation’s duration) I will perform all the necessary subsequent behaviour on the server (like the damage dealing). So the important stuff will happen at the same time for all players, but if somebody is lagging, the animation might take a while and be out of sync, which I don’t think is a big problem.

Alternatively, I could wait until all players have finished playing the animation to perform the subsequent behaviour. But I’m worried about one player having a slow connection which halts the gameplay for everybody.

Any ideas?

Maybe you can make the animations depend on synchronized time (see *DO NOT USE* High precision clock syncing tech between clients and server with accuracy of <1ms - #40 by MrGreystone and Workspace | Roblox Creator Documentation).

I will look into this. Thank you very much!