Hockey System Shooting is too off

Here is how it looks at the moment
If I aim where I want it, the puck still goes a bit off
https://gyazo.com/40b5a7c367ae8310796ba7a165400435
Here’s the code for shooting

Server

    local bodyforce = Instance.new("BodyVelocity")
	bodyforce.MaxForce = Vector3.new(1,1,1) * math.huge
	bodyforce.Velocity = mouse:InvokeClient(plrService:GetPlayerFromCharacter(Tool.Parent)) * force
	bodyforce.Parent = attached
	bodyforce.P = math.huge
	Tool.Handle.ShootSound:Play()			
	game.Debris:AddItem(bodyforce, .25)

Client

script.Parent.Remote.OnClientInvoke = function()
	return (mouse.Hit.LookVector + mouse.Hit.UpVector/10)
end

If you’re wondering why mouse.Hit.UpVector/10 is divided by 10, its because if I didnt divide it by 10 the puck would eventually shoot too up

Any help I would appreciate

2 Likes

No one seemed to help so after further scanning and using all of my brain cells I came to solution, why not calculate the trajectory between mouse hit position and the blade position

remote.OnClientInvoke = function()
	return (mouse.Hit.Position - tool.StickHitbox.Position).Unit
end
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.