I am currently scripting a combat system, but for some reason, knockback only applies to Player and not NPCs
https://gyazo.com/105384cae495ab7ccf87f1c8392211f6
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(4e4,4e4,4e4)
BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.lookVector * KnockbackVelocity
BodyVelocity.Parent = TargetCharacter.HumanoidRootPart
game.Debris:AddItem(BodyVelocity, .1)
DasKairo
(Cairo)
2
Not sure about you but: Appears to be working
quakage
(quakage)
3
Try putting a print statement for TargetCharacter.HumanoidRootPart. If it was nil for NPC’s you wouldn’t see any knockback.
is the npc humanoidrootpart anchored?
No. Is clearly moving, if its anchored it wouldn’t be moving.
it would print a error in the output, this is not the case.
Here is a more clear video. Mb, I didn’t know it cut off https://gyazo.com/08364a24a478b45680c1c1263b687d9b