The best way to play ped animations?

Hello! I don’t post here much… at all, buuut I gotta after the discord went down! Might be better on here anyways, hopefully I can help all of you with whatever I know too. ^.^

but useless introduction you don’t care about aside, what’s the best way to play ped animations? Of course we got the good ol’ TaskPlayAnim, but I’ve seen a good few other functions to play animations on entities. I wouldn’t bother bringing this discussion up but, I’ve had my fair share of problems with TaskPlayAnim… mostly (well, only) sync. It’s not uncommon that one of us (my bf and I) will ragdoll and cause our animation to stop syncing entirely (it’ll still play locally though).

This is because, after the ragdoll I instantly set the animation back up, apparently too fast because my partner’s game still thinks I’m ragdolled and fails to set my animation (from what I gather anywho). So like, that’s no bueno. Again, I hardly EVER communicate with most of the FiveM community, besides a few posts on the forum here and occasionally chatting on the discord server in scripting… so I really don’t know what is the accepted standard, or if there is one. I just don’t want clients to seemingly randomly not play other clients’ animations.

So, is something like PlayEntityAnim worth using instead? Any flags or workarounds I should look into trying to do? How do y’all deal with this? Surely you don’t let your handcuffed peds just flop over and suddenly not be cuffed (just as an example, but this is much broader a question than just cuffing).