Need help with lerping

zombie = script.Parent.HumanoidRootPart
node2 = game.Workspace.Map.Nodes:FindFirstChild("2")
node3 = game.Workspace.Map.Nodes:FindFirstChild("3")
node4 = game.Workspace.Map.Nodes:FindFirstChild("4")
node5 = game.Workspace.Map.Nodes:FindFirstChild("5")
node6 = game.Workspace.Map.Nodes:FindFirstChild("6")
node7 = game.Workspace.Map.Nodes:FindFirstChild("7")
node8 = game.Workspace.Map.Nodes:FindFirstChild("8")
node9 = game.Workspace.Map.Nodes:FindFirstChild("9")
node10 = game.Workspace.Map.Nodes:FindFirstChild("10")

for i = 0, 1, 0.01 do
	wait()
	zombie.CFrame = zombie.CFrame:Lerp(node2.CFrame, i)
end

for i = 0, 1, 0.01 do
	wait()
	zombie.CFrame = zombie.CFrame:Lerp(node3.CFrame, i)
end

so i have two issues with this:

  1. it does not move to the other point in a constant speed
  2. the speed is determined by percentage of the distance (i want a fixed speed)

how can i fix these two issues? ive heard that i need to use math but havent heard much other than that

i know that it isnt very efficient rn with variables and stuff but i just want it working for now

You can use tweens for a linear transition with constant speed

1 Like

someone told me that tweens skip and lerps dont but from what i see they both skip
is there something im doing wrong?

What exactly do you mean by “skip”?

by that i mean little increments of teleportation until it gets to where it needs to be
i do believe that its inevitable to have that though

The delay shouldn’t be very noticable, especially with tweens. From my experience tweens look pretty smooth on the server unless you have too many tweens playing at the same time.

yeah i prefer tweens but i wanted to try out lerps
i think im just going to stick with tweenservice lol