Lerps being buggy and not working

Hey! I’ve been trying to get into moving projectiles with CFrames instead of velocities since its more reliable and doesnt depend on janky physics. However, while trying to do this the part I’m using simply refuses to move at all with the lerp. I am not sure why this is happening, if someone would be able to help I’d appreciate it.

Code Snippet :



for i = 0,1,0.01 do
Projectile:SetPrimaryPartCFrame(StartingPoint:Lerp(Projectile.PrimaryPart.CFrame * CFrame.new(0,0,-125),i))
task.wait()
end
1 Like

You can tween it instead

2 Likes

If you still are wondering how to use that lerp

local originalPosition = Projectile.CFrame

for i = 0,1,0.01 do
wait()
projectile.CFrame = originalPosition:Lerp(projectile.CFrame * CFrame.new(0,0,-125),i)
end

This’ll work, but the projectile will speed up as it nears the end of the lerp.