Stopping the ball from rolling infinetly

The title says it all, im tryna make a script to stop the ball from rolling infinetly.

Ive had a script with bodyforce that if the velocity magnitude of the ball was higher of 0, the bodyforce wouldve reduced the speed on Z and X axes, but now that bodyforce is depracated, i tried putting a linear velocity in it with an attachment.

But i had still a problem with that, while goalkeepers tried to catch the ball, they would be stuck with the ball.

so after that, i got a suggestion from a friend of mine: he told me i should use assembly linear velocity diving it by 2.
The problem now is that i dont understand why it still doesnt work, do i have to change the property Assembly Linear Velocity for it to work?

This my script

while true do
    if ball.Velocity.Magnitude > 0 then
        ball.AssemblyLinearVelocity = ball.AssemblyLinearVelocity/2

I would appreciate every help i can get


note: the Assembly Linear Velocity property on the ball is 0, 0, 0

1 Like

Can you do ball.AssemblyLinearVelocity =, 0, 0)

1 Like

Instead of changing the velocity, change the Rotational Velocity.

1 Like

sorry if i took time to reply, i tried but it doesn’t work

i also tried this but this doesnt work either

Is the ball on a hill? Or a slope, because AssemblyLinearVelocity should work.

normal pitch, no hills, all flat

is it because im applying it wrongly? but assembly linear velocity =,0,0) seems fine (still doesnt work tho)

Interesting, I’ve never heard of this. Are you doing it on the client? Try setting both the linear and rotational velocity to

doing it on server side, ill try rn

It’s not the that will solve it, that’s just a shorthand, you have to change both the AssemblyAngularVelocity and AssemblyLinearVelocity, or it will keep moving.

i tried that but when i spawn the ball starts to move automatically

Okay, now that you’re doing both of them on the server and it’s NOT on a slope, I am completely dumbfounded. Are there any external forces acting on it?

actually, theres still a bodygyro and a bodyforce that makes the ball slow a little bit, but it used to stop a lot faster as i would of create a body force on the script in the loop, but now thay they are deprecated, idk what to do

Please don’t use BodyMovers, they are deprecated. Use AlignPosition in place of it, it does the same thing.

the problem is that, as i use attachments on the ball, whenever the goalkeepers catch it, the ball stays like anchored meanwhile it bugs their character till it drops automatically

So it’s a technical issue… I see.

Can you send a video of it? So I can understand better.

had to rec from my phone as im still fixing the screen recorder from my pc, hope u can still understand from this video

it shouldnt go that far as the power from that tool aint that strong and at that time the ball would have stopped before the line of the mid pitch