# How to convert a bodyvelocity to vectorforce?

I am trying to handle knockback for an explosion, but am running into a problem.

I want to switch the knockback from using bodyvelocity to vectorforce, as bodyvelocity is deprecated and could break at any moment. The problem is that it doesn’t work.

My sad attempt at vector Force implementation:

``````local directionVector = (torsos.Parent.HumanoidRootPart.Position - explosion.Position).unit
local velocity = directionVector * 100

-- WHY THIS NO WORK?!!!!!!!11!! >:(

local A0 = Instance.new("Attachment")
A0.Parent = torsos.Parent.HumanoidRootPart

local vf = Instance.new("VectorForce")
vf.Parent = torsos.Parent.HumanoidRootPart
vf.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
vf.ApplyAtCenterOfMass = true
vf.Force = velocity
vf.Attachment0 = A0

``````

Versus my Body Velocity implementation:

``````local directionVector = (torsos.Parent.HumanoidRootPart.Position - explosion.Position).unit
local velocity = directionVector * 100

local bv = Instance.new("BodyVelocity")
bv.Parent = torsos.Parent.HumanoidRootPart
bv.MaxForce = Vector3.new(1e9, 1e9, 1e9)
bv.Velocity = velocity

``````

Am I handling the attachment wrong? Or do I need to compensate for something new in vector force?

I wouldn’t use vector force due to the fact that it was not intended to replace body velocity, what I would use is LinearVelocity which was meant to replace body velocity (but still doesn’t has some of its capabilities) its the best option to choose to switching.

tried it, still doesn’t work, what am I screwing up?

``````local directionVector = (torsos.Parent.HumanoidRootPart.Position - explosion.Position).unit
local velocity = directionVector * 100

local A0 = Instance.new("Attachment")
A0.Parent = torsos.Parent.HumanoidRootPart

local lv = Instance.new("LinearVelocity")
lv.Parent = torsos.Parent.HumanoidRootPart
lv.MaxForce = Vector3.new(1e9, 1e9, 1e9)
lv.VectorVelocity = velocity
lv.Attachment0 = A0