Need help with :Lerp() Function

when i for the for loop reaches 0.3 to 0.4, the lerp distance is set to 100%, I am very confused. If Lerp Requires a number between 0 and 1, shouldn’t 0.3 and 0.4 be set to 30% to 40% ? why does the lerp finish at 0.3 - 0.4, when it should finish at 1.0, logically. My brain Hurts, Help!!!

I think it’s because you take the new CFrame and not the original, taking the new CFrame changes the percentage

local Original = Start.CFrame
for i = 0, 1, 0.01 do
	Start.CFrame = Original:Lerp(End1.CFrame, i)

PS: if this solves your problem, mark it as a solution.

1 Like

OMG bro, I completly understand this, the cframe was keep on changing inside the for loop, thats why it was confusing it finishing at 0.3 - 0.4, lol It was that simple. Btw if you can, may I know your thought process on how u managed to come up with a solution, or is this just experience?

1 Like

Hi, what are you using something like this for?

1 Like

for learning purposes?

Start = part
End = part 2

Using :Lerp() between them to make one go into the position of another

Okay,

It’s because I wouldn’t recommend a for loop for moving a part from A to B.