Let's say you were to throw an object in ROBLOX. After throwing, if it's sphere-like object, it will probably start rolling. What is the best way to prevent this?
I tried this myself, with successful results:
while wait(0.1) do
if part.RotVelocity.magnitude > 0.2 then --part is the part we're trying to stop
part.RotVelocity = Vector3.new(0,0,0)
end
end
but as it's server-side script, obviously, don't you think it could be laggy? Well, it's all numbers we're checking and setting so probably not, and there's also a better way. That is, putting the condition of the if statement of the previous example inside the while, so when the RotVelocity is reset, it shouldn't roll again on it's own. Is there anyway a better way at all to detect the rolling and stop it or is this as good as it gets?
Thanks,
SwaggyDuckie

2 comments
You could just anchor it.
Then I would have to detect touch, and this wouldn't work in my case as I need the projectile to bounce off of walls.