Ball is Curving incorrectly

so, I’m basically trying to make the ball curve (when thrown) to the mouse position, or the attachment (called ‘a1’) in this case as that follows the mouse position as well. . . While it works (sorta), it’s not exactly going to the attachment’s position

local dir = ball.Position - workspace.Trajectory.a1.Position
local dur = math.log(1.001 + dir.Magnitude + 0.01)
local force = dir + Vector3.new(0, workspace.Gravity * 0.5, 0)
	
ball:ApplyImpulse(force * ball.AssemblyMass)

Obviously I tried a few stuff before coming here, but failed.

External Media
1 Like

If you mean by “gravity” I’ve heard you can set that up with a module called FastCast Making a combat game with ranged weapons? FastCast may be the module for you!
As stated it’s designed for weapons, but the ball is basically a bullet so it can be set up however you want it to be.

Roblox physics are unreliable.

If you’re looking to create a curve, I’d suggest using CFrame with bezier curves, or if you want it to be affected by gravity, CFrame with a Gravity formula that makes it go down

I’ll try that when I have the time, thanks!

I was thinking the same thing, but I’m not sure how I would go about doing that as when I tried, it failed pretty terribly (by terribly, it basically just crashes?).

for making a proper curve I strongly recommend you visiting this