Combat some times flings players

Hello! I have a combat system where you hit a player down while doing a air combo, however some times when the player you hit down and collides with a part they will be flung and usually die. Also, I use BodyVelocity to make them go down then delete it after.

Here is the code that does so:

local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyVelocity.Velocity = ((Enemy.HumanoidRootPart.CFrame.p - Character.HumanoidRootPart.CFrame.p).unit * 30) - Vector3.new(0, 20, 0)
BodyVelocity.Name = "HitDown"
BodyVelocity.Parent = Enemy.HumanoidRootPart

Is there any way I can prevent this?

How do you even get the player another player has hit?

There is more code, this is just showing how I knock down the player. I’m only showing the necessary part for it.

Oh no, I am just asking for my own knowledge.

Not a lot of context to this and a very limited scope of the code.

Check the following;

  • Are you sure you delete the BV?
  • In ((…).unit * 30) - Vector3.new(0, 20, 0) you are making the body go down at an angle
  • Are you sure that you only add the BV once?
  • When you delete the BV are you calling the variable BodyVelocity or indexing it by it’s name?