Ah I think I understand now. Assuming this is single-player and you intend on running the physics on the client:
TweenService was a good idea. You can remove the humanoid entirely and use an AnimationController to make the walking animation. Tween duration needs to be a function of the distance between the two points: Duration = Distance / WalkSpeed
. For each straight length of path, you’ll need your own tween, with potentially other tweens at each ‘corner’ to handle rotation unless you want your NPCs drifting through each corner. Utilise the .Completed event of each tween to know when to activate the next one. You can do all of this in a LocalScript on the client.
If progress and such is being saved and used in a leaderboard-type situation then you can update the server script with progress via remotes. If you’re concerned about exploiters, it’s a potential weakness of this system, but equally most exploits/exploiters won’t be advanced enough to abuse it so long as you’re smart with the type of information you’re sending over as well as sanity checking on the server to make sure. My point about network ownership may still benefit you as well. If you create your npcs on the server, set their network ownership to the client, then have the client tween the npc, then that movement should be replicated to the server. In that case then you’ll be able to handle the turret logic server-side or client-side (whichever you decide).
If you still wish to use humanoids, make sure you’re disabling as many unnecessary states as possible to free up some of the internal processing that the Humanoid’s controller is doing in the background.
Here’s some advice about Humanoid optimisation: How to Optimize Humanoids