Body velocity going one direction

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
1 Like

Kb.Knockback(echar,hrp.CFrame + hrp.CFrame.LookVector, Vector3.new(13,6),.5)

Does it have anything to do with the fact you only have 2 numbers in Vector3.new(13,6)?

1 Like

lookvector is already a direction, might fix the issue you’re having

local power = 10

Kb.Knockback(echar,hrp.CFrame.LookVector, power,.5)
1 Like

didnt work, now it just moves side to side