So im using body velocity for knock back and i want it to go a certain direction. but it just keep going one way it will never go the way the person is facing
–knockback script
local module = {}
function module.Knockback (char, direction, force, deletetime)
local debris = game:GetService("Debris")
local bv = Instance.new("BodyVelocity")
bv.Parent = char:WaitForChild("HumanoidRootPart")
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = direction * force
bv.P = 10
debris:AddItem(bv, deletetime)
end
return module
–script firing moduld
elseif punchnum == 4 then
Kb.Knockback(echar,hrp.CFrame + hrp.CFrame.LookVector, Vector3.new(13,6),.5)
hum.WalkSpeed = 16
hum.JumpPower = 50
if RT:IsA("BoolValue")then
RT.Value = true
task.wait(3)
RT.Value = false
end
end
debris:AddItem(obj, deletetime)
end)
end
return module