Understanding Client side Animations and Server side movement

While looking through different forum posts ive come to learn that the recommended way to play animations for NPC’s are on the client side while movement for NPC’s should be done server side. I was wondering if someone could explain how one should write scripts to have both of them work together.

From my attempts I’ve tried using heartbeat with remote events and unreliable remotes to share player location between the two scripts but that would cause an overload of remotes events. if someone could explain a better way that would be great!

1 Like

You could sync them by comparing times between the client and server and then executing it like a few ms after if that makes sense

GetServerTimeNow() should be able to help you with this since it sends the same time on server and client, so you could say “hey i want this to run GSTN() + 10 after the current time”