Why NPC moving so slow (kinda hopping)

I just dont have idea why he does this

while enemy ~= nil do
		wait()
		local dist = (enemy.HumanoidRootPart.Position - char.HumanoidRootPart.Position).Magnitude
		if dist < FollowDist and dist > BlockDist then
			print("Go to player")
			local path = PathfindingService:CreatePath()
			path:ComputeAsync(char.HumanoidRootPart.Position, enemy.PrimaryPart.Position)
			local waypoints = path:GetWaypoints()
			for waypointIndex, waypoint in pairs(waypoints) do
				local waypointPosition = waypoint.Position
				print(waypointPosition)
				char.Humanoid:MoveTo(waypointPosition)
			end
		elseif dist < BlockDist and dist > AttackDist then
			char.Humanoid:MoveTo(char.PrimaryPart.Position)
			print("Dash or block")
		elseif dist < AttackDist then
			print("attack")
		end
	end

EDIT: Added char.Humanoid.MoveToFinished:Wait() but it still hops

1 Like

It is not hopping but since it has no animation it looks weird!

its hoping (30 charssssssssssssssssss)

Ohh I see what you mean! This is because of delay, really nothing you can do about it. Using remotes will make it have a bigger delay so dont try that

but how i would make NPC that wouldnt hop like this.

try lerping it youd be surprised that people lerp

lerping? On serverside? ig its bad idea

in the server fire to the client