Need help with vectorforce

There are a few things that I’d like to fix with the knockback that an attacked person takes.

  1. The knockback freezes near the end for some reason. I can’t find any guides on how to solve this. My proof:
    2023-08-03 21-52-36
  2. I want to find some way to actually know the knockback of the attacked person in terms of studs. I know vector force may not be the best tool for this, and if you have something better I would like it if you would implement it into my code:
local back = player.Character.HumanoidRootPart.CFrame.LookVector
local att = Instance.new("Attachment", v.Parent:WaitForChild("HumanoidRootPart"))
local force = Instance.new("VectorForce", v.Parent:WaitForChild("HumanoidRootPart"))
force.Attachment0 = att
force.Force = back * 15000
force.RelativeTo = Enum.ActuatorRelativeTo.World
wait(0.5)
force:Destroy()
att:Destroy()
  1. The knockback taken when a person dies is far greater than what they take when they are alive, as shown in the above video. Is there some way I can change that?
  2. There seems to be a significant delay between hitting dummies and hitting actual players. Any way to fix that?

Many thanks!

1 Like