I am currently using the parts velocity to move the part around using the mouse position look vector, however once a force is applied on the part it never stops. I have no idea how to stop with a Vector3
while game:GetService("RunService").Heartbeat:Wait() do
if Acceleration == true then
Ball.Velocity += Vector3.new(-100,0,100)
end
if Ball.Velocity.X > 0 or Ball.Velocity.Z > 0 then
Acceleration = false
end
end
Currently, when ever I try to decelerate it with this code it just accelerates instead depending on were the mouse position was. Can someone help.
But then the ball won’t even accelerate and will just say idle. I want a smooth deceleration to 0 not an instant stop in force. Tweening is also not an option too.
would there be an alternative because I would want to be able to configure how fast the ball decelerate at, which I’m not sure BasePart:ApplyImpulse() can do.