I’m working on a tower defense project, and I want to have smooth and non-laggy enemy movement.
Some devforum posts say to use client-sided rendering or movement, but how exactly can I do this?
My main issue with this is that I couldn’t figure out how to make enemy positions in-sync across all clients. For the game, I need to tween the enemies across nodes until it reaches the last node, which I can do, but being in sync on every client, I’m not sure how I can do that.
I’ve been trying to figure this out for a while now, any help would be appreciated.
You can use workspace:GetServerTimeNow() to get the time offset between when an enemy spawns on the server (send the server time to the client) and calling the function on the client for comparison.
This should get a time offset when multiplied by the enemies speed get a distance offset needed to sync the client with the server.