CFrame lerping causes bullet to go crazy after reaching destination?

Hi All,

I have an issue with lerping my bullet to its destination, where after reaching its destination, it pauses temporarily and then moves sporadically into another direction. I’m not sure what’s causing this issue, and my code along with a video is below.

Thanks,
Haly

1 Like

Replace this line:
NewBullet.CFrame = NewBullet.CFrame:lerp(BulletEnd, i)

With this line:
NewBullet.CFrame = NewBullet.CFrame:lerp(BulletEnd, i/TravelDistance)

You’re also gonna want to make the speed a constant value instead of being related to the TravelDistance

1 Like

Thank you so much for the help! I totally didn’t realize that the second argument for lerp was a fraction. My speed isn’t constant because my bullet is purely visual, and my damage system will be an instantaneous ray. I slowed down the bullet speed (TravelDistance / 100) instead of (TravelDistance / 5) so I could see what’s going on. Thanks again!