hold up, The body position is sending the ball way too much and after it hits the player, it flys out of the world and flys back in, imma try linear velocity rq
Hmm, yeah try that out it could actually work better since its giving the ball a velocity and you can control the speed much better
Iâm having trouble controlling the speed of the ball, its either EXTREMELY slow or EXTREMELY fast.
with * CSpeed its way to fast but without its really slow
clonedBall.LinearVelocity.VectorVelocity = direction * CSpeed
clonedBall.LinearVelocity.MaxForce = math.huge
Oh Gosh, Iâm dumb, when I was trying body position I set the accel to math.huge and forgot to fix it. XD
BasePart.Velocity is deprecated, AFAIK AssemblyLinearVelocity should work for your use case? Also BodyPositionâs are deprecated, you should use AlignPosition for new work. I say that because BodyPositionâs could break in the next update and they wouldnât fix it.
Also to follow up, donât set the MaxForce of any constraints to math.huge. It has a large chance of making the simulation unstable and you should use a large number constant.
ok so it works really well, except at higher speeds, is there a way to make the momentum INSTANTLY change direction? like how when a baseball hits a bat, the ball instantly goes a different way.
robloxapp-20231127-1301181.wmv (1.2 MB)
Actually, I have a gravity script and .Velocity still works for me on the newest version of studio