Hi. Trying to make an object slow down from its current velocity to 0 in a certain distance. In a for loop there would be the current speed, then the goal (0), then the change which is removed from the current speed. I need to calculate the change so it slows down and is at 0 when at the ending position.
this is what I tried:
local n = currentV / (object.Core.Position-script.Parent.EndPosition.Position).magnitude
for i=currentV, 0, n do
n = currentV / (object.Core.Position-script.Parent.EndPosition.Position).magnitude
object.Core.BodyVelocity.Velocity = object.Core.CFrame.lookVector * i
wait()
end
I set 'n' as the difference. I need help on how to calculate 'n'. Cheers
