Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there anyway to stop the ball from doing this?

Hi, I have a ball that moves with velocity. However, once the ball has stopped moving, you can still see the ball spin around like crazy even though its not moving anymore

Is there anyway to stop the ball from spinning once its finished moving? I tried setting rotvelocity to vector3.new(0,0,0) but it still spins

is this a Roblox glitch? is there anyway to stop it?

1 answer

✓ Accepted answer

You can insert a BodyAngularVelocity when you want the ball to stop spinning.

local ball = game.Workspace.Ball
...
-- The ball has now stopped rolling, but is still spinning
local angularVelocity = Instance.new("BodyAngularVelocity", ball)
local maxTorque = 1000 -- How much torque used to stop the ball from spinning
local duration = 3 -- How long the "anti-spin" force is applied
angularVelocity.AngularVelocity = Vector3.new(0, 0, 0)
angularVelocity.MaxTorque = Vector3.new(maxTorque, maxTorque, maxTorque)
wait(duration)
angularVelocity:Destroy()
-- Hopefully the ball has stopped spinning

1 comment

0

thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.