Let's say I have a partPart1. The CFrame I want to move it to is the CFrame of another part, Part2.
I want to use CFrame:lerp() to move it with tweening its CFrame, with a delay of d. How do I do this?
✓ ANSWER ACCEPTED
How do I use CFrame:lerp()?
1 answer
✓ Accepted answer
Ok, at first glimpse Lerp() may seem complicated, but its rather simple. Solerp stands for Linear Interpolation. Lerping is a mathematical technique for producing intermediate states between a start and an endpoint. This is very similar to how you tween guis. To use lerp, you need to loop may a loop so it can smoothly glide to another Cframe.
--------------Variables----------------
Part1 = game.Workspace.part1
Part2 = game.Workspace.part2
d = nil
------------Code------------------------
for i = 0,1, .1 do
d = i
Part1.CFrame = Part1.CFrame:lerp(Part2.CFrame(d)
wait()
end
This will make the part lerp from its current position to another
~~Hope I Helped
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
What do you need the 'd' variable?
He used it in his
Thanks. BTW d is delay between each "frame" of moving.