# How to stop a ball rolling?

I have literally tried everything to stop this ball rolling forever… I just dont know why it keeps on rolling: Here are scripts that I have in this ball.

``````
local force = Instance.new("BodyVelocity")
force.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
force.P = 9999
force.Velocity = (hit.Parent:FindFirstChild("HumanoidRootPart").CFrame.LookVector + Vector3.new(0,0.6, 0)) * 60
force.Parent = script.Parent
game:GetService("ReplicatedStorage").Events.PwrAway:FireClient(plr)
plr.PwrData.PwrShot.Value = false

local fire = Instance.new("Fire")
fire.Color = Color3.new(1, 0, 1)
fire.Parent = script.Parent

else
local force = Instance.new("BodyVelocity")
force.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
force.P = 999
force.Velocity = (hit.Parent:FindFirstChild("HumanoidRootPart").CFrame.LookVector + Vector3.new(0, pwr/2/100, 0) ) *  pwr/2
force.Parent = script.Parent
``````

second:

``````local part = script.parent

while wait() do
part.AssemblyLinearVelocity = 0.6 * part.AssemblyLinearVelocity
part.AssemblyAngularVelocity = 0.6 * part.AssemblyAngularVelocity

wait(0.2)
end
``````

you can just Anchor the ball

` `

1 Like

That does not work. It continues to roll afterwards

no, if `Ball.Anchor` is true, the ball won’t move anywhere till `Ball.Anchor` is false

In a heartbeat loop use tweenservice and then tween the AssemblyLinearVelocity to 0, the time can vary depending on how fats or slow you wasnt the ball to reach a Velocity of 0, meaning not rolling anymore

1 Like

Small thing:

``````Vector3.one * math.huge
``````

Thanks but it is not affecting anything

you can use this to slow it down faster

``````local damping = 0.9
local ball = script.Parent
while (ball) do
ball.RotVelocity = damping * ball.RotVelocity
end
``````

or if you want to do it instantly then set it to Vector3.new()

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.