Teleport towards a part in incrmeents

How would i, lets say teleport my player towards a part in increments of 10 studs at a time? I know the teleport part but how would i make it go towards a part?

Firstly, you’d have to figure out the distance from partA to partB, which can be worked out with the formula rayDirection = partB - partA. Now, this is good to know, but without any sort of standardized unit, it’s basically worthless. Now, luckily for us, that’s where .Unit comes in. This will return the direction in 1 stud increments, but that’s still not good enough, since you want 10. Luckily, we can just do that number x 10, as we know it’s already in 1 stud.

Overall, it’ll look like this:

rayDirection = (rayDestination - rayOrigin).Unit * 10
local part = workspace:WaitForChild("Part")
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local hmr = character:WaitForChild("HumanoidRootPart")

while task.wait(3) do
	hmr.CFrame = CFrame.lookAt(hmr.Positon, part.Position)
	--teleport character towards part
end
local part = workspace:WaitForChild("Part")
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local hmr = character:WaitForChild("HumanoidRootPart")

while task.wait(3) do
	hmr.CFrame = CFrame.lookAt(hmr.Position, part.Position)
	--teleport character towards part
end

What is the difference between the quoted code and the code you have pasted. No need to bump an old topic

Mines actually works cuz you see he missed spelled Position Positon