hmm, Is PlrToKnockback a player instance, because then bodyVelocity will not work. It should be a basepart such as as the player’s hrp. I believe you use a touched event, so I assume your code snippet is just the body Velocity.
local Part = script.Parent
local EnemyChar = ...
Part.Touched:Connect(function(hit)
local HRP = hit.Parent:FindFirstChild("HumanoidRootPart")
if HRP then
local PlrToKnockback = hrp
local BV = Instance.new("BodyVelocity", PlrToKnockback)
BV.MaxForce = Vector3.new(25000, 25000, 25000)
BV.Velocity = EnemyChar.HumanoidRootPart.CFrame.lookVector * 100
game:GetService("Debris"):AddItem(BV, .5)
end
end)
So I think if figured out the problem it’s the Parent it should be in the enemy’s hrp and also if you want them to take Knick back the easier way is ehrp.CFrame.LookVector * -100 or maybe -ehrp.CFrame.LookVector * 100 and ehrp is enemy humanoid root part.