Hello, I’ve been working on this for a while now. How can I make it so that the speed adjusts slowly instead of immediately. In other words, the car should not increase its speed directly.
local direction = (destination - Car.Position).unit
local distance = (destination - Car.Position).magnitude
local timeToReach = distance / currentPoint.Speed
local Tween1 = game:GetService("TweenService"):Create(Car, TweenInfo.new(timeToReach, Enum.EasingStyle.Linear), {Position = destination})
Tween1:Play()
local lookAt = CFrame.new(Car.Position, destination).lookVector
local Tween2 = game:GetService("TweenService"):Create(Car, TweenInfo.new(timeToReach, Enum.EasingStyle.Linear), {CFrame = CFrame.new(Car.Position, Car.Position + Vector3.new(lookAt.X, 0, lookAt.Z))})
Tween2:Play()
wait(timeToReach)
So you want the car to keep going? Then I guess you should use something like BodyVelocity or LinearVelocity. On the BodyVelocity, tween the .Velocity property to a your needed speed, and it’ll be constantly accelerating.