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
wait(0.1)
if ball.Velocity.Magnitude > 0 then
wait()
ball.AssemblyLinearVelocity = ball.AssemblyLinearVelocity/2
end
end
It’s not the Vector3.zero that will solve it, that’s just a shorthand, you have to change both the AssemblyAngularVelocity and AssemblyLinearVelocity, or it will keep moving.
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
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