When using the :MoveTo() function on a Humanoid, I’ve come across this issue where the character will “jitter” to it’s destination. This ONLY occurs when the Humanoid is owned by a client. When it is owned by nil / the server, this no longer occurs, resulting in smoother movement.
This is very problematic, as by default, assemblies (including Humanoids) can have automatic network ownership, resulting in these NPCs being “claimed” by players. This means any MoveTo operations on the server will result in this jitter behavior.
Here is a video demonstrating this issue:
Alongside a place file showing this issue:
NPCJitterNetworkRepro.rbxl (86.4 KB)
I’ve come across temporary mitigation, which is very hacky, involving repeatedly spamming MoveTo until the NPC reaches the destination. This results in the NPC not jittering on it’s way to the destination. I presume a lot of developers implement this behavior, which is why no one runs into this issue.
Here is the place file with this provided hacky fix:
NPCNoJitterNetworkRepro.rbxl (81.6 KB)
It may take about a minute for the client to begin receiving automatic network ownership of an NPC.
Expected behavior
The NPC should not jitter when MoveTo is used on the server, with the NPC being owned by a client.