What is a good replacement for BodyVelocity

I don’t really want to use BodyVelocity because it’s deprecated. I don’t really know a how to use linear velocity or vector force. This function is for applying knock back.

function module.BodyVelocity (parent, HRP, Knockback, stayTime)
	local bv = Instance.new ("BodyVelocity")
	
	bv.MaxForce = Vector3.new(math.huge,0,math.huge)
	bv.P = 50000
	bv.Velocity = HRP.CFrame.LookVector * Knockback
	bv.Parent = parent
		
	Debris:AddItem(bv,stayTime)
end
1 Like

Try using :ApplyImpulse()?

Linear velocity and vector force are really easy to use actually
All you need is one attachment and to set their mode to OneAttachment

there is an attachment already in HumanoidRootPart called rootAttachment
you can use that as your anchor

Oh, I didn’t know that thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.