Velocity isn't moving a ball after a few hits?
So currently I am working on a mechanic when a ball will get pushed using the Velocity property of the ball. The problem I am having is after the ball gets pushed around a few times after using the velocity property, the ball seems to not longer travel any further than about half a stud. Although the first few times you hit the ball it travels all the way across the box its in if you use enough power.
I am unsure why after a few hits it stops moving and I am unsure if its a scripting problem or more of a physics problem for studio.
The Code Moving The Ball
02 | local event = game:GetService( "ReplicatedStorage" ).Hit |
03 | local stick = workspace.Stick |
05 | event.OnServerEvent:Connect( function (plr,distace,power) |
12 | local stickCframe = stick.CFrame |
13 | local lv = stickCframe.lookVector |
14 | script.Parent.Velocity = lv*force |
The following is located in a script parented under the ball.
Additional information:
-The script does run every time the event is called.
-The script calling the event waits until the Balls velocity is 0 in all positions (The ball does actually hit 0 in all positions I made sure to test that)
-All custom physical properties are default
-Anchored is always false
If you have any extra questions and want a quick reply contact me on discord: deth836231#6264