Basically i want the ball to move forward and curve when kicked
when you kick the ball it moves forward and it curves but the direction it curves changes depending on where the player is looking so if i kick it one way then look the other way and kick the ball again it will curve the wrong way
correct way
wrong way
local yy = Instance.new("BodyVelocity")
yy.maxForce = Vector3.new(math.huge, math.huge, math.huge)
if side == "Right" then
yy.Velocity = (Root.CFrame.LookVector + Root.CFrame.RightVector)*(Data.Strength*Settings.Kick_Force) + Vector3.new(0,10,0)
else
yy.Velocity = (Root.CFrame.LookVector + -Root.CFrame.RightVector)*(Data.Strength*Settings.Kick_Force) + Vector3.new(0,10,0)
end
yy.Parent = Ball
local vel2 = Vector3.new(0,0,18)
if side == "Right" then
vel = Vector3.new(0,0, -18)
end
task.spawn(function()
while task.wait(0.05) do
if not yy then
break
end
yy.Velocity+=vel2
end
end)
game.Debris:AddItem(yy,0.6)