trying to make it so when you shoot a gun it knocks you back a bit, but its knocking me back to the side. Btw the head is looking at the direction of the shooting.
code:
local KB = Instance.new("VectorForce")
KB.Parent = Character:FindFirstChildWhichIsA("Humanoid").RootPart
KB.Force = Character:FindFirstChildWhichIsA("Humanoid").RootPart.Position + -Character.Head.CFrame.LookVector * Settings.FireKnockBack
KB.Attachment0 = Character:FindFirstChildWhichIsA("Humanoid").RootPart:FindFirstChildWhichIsA("Attachment")
KB.Visible = true
game:GetService("Debris"):AddItem(KB,.1)
game.ReplicatedStorage.Library.Events.FireBullet:FireServer(Settings.Bullet,Settings.BulletSpeed,script.Parent.OutPut.Position,Mouse.Hit.Position,Settings.BulletTime)