Hello, My combat system is working well, However my linearvelocity only knocks it in one direction, I want it to knock the enemy the backwards depending where the player is facing. I have tried using lookVector but can’t seem to get it.
here is my code
function Combat.Knockback(Player, CharacterHit, Power)
local HumanoidRootPart = CharacterHit:FindFirstChild("HumanoidRootPart")
local Attachment = Instance.new("Attachment", HumanoidRootPart)
local LinearVelocity = Instance.new("LinearVelocity", Attachment)
LinearVelocity.MaxForce = math.huge
LinearVelocity.VectorVelocity = HumanoidRootPart.CFrame.lookVector * Power
LinearVelocity.Attachment0 = Attachment
Debris:AddItem(Attachment, 0.2)
end