Im scripting a reaction system for a football game, a reaction system is like the touch system so you can apply ball velocity and stuff.
local u = (math.sqrt((math.abs(hit.Velocity.X) ^ 2) + (math.abs(hit.Velocity.Z) ^ 2)))
if u < 30 then u = 30 end
local F = Instance.new("BodyVelocity") --this part
F.Velocity = Player.Character.HumanoidRootPart.CFrame.rightVector * (u * 0.4) * Vector3.new(1, 0, 1)
F.Velocity = F.Velocity + Vector3.new(0, math.abs(hit.Velocity.Y) * 2, 0)
F.MaxForce = Vector3.new(1e+005, 1e+005, 1e+005)
I was using the rightVector for the cframe to apply velocity based react, velocity based react is when the ball is deflected with bodyvelocity based on the balls velocity.
I used rightvector which worked well but i wanna know what I can do to make the ball go straight instead of right