ApplyImpulse teleports/too fast

So im having an issue with ApplyImpulse for knockback. Previously, I was using BodyVelocity which did seem to work slightly better, but also had an issue where it would kind of lag and the distance was not constant.

https://streamable.com/8xnp3h
Here’s a video show casing my issue, you can see the dummy kind of teleporting

  1. Script?
  2. Try lowering the power
function MovesManager:Knockback(Attacker, Target, Power, Length, FaceDirection, OnEnd)
    --if not Target.PrimaryPart:FindFirstChildWhichIsA("BodyVelocity") then
        Target:FindFirstChildWhichIsA("Humanoid").AutoRotate = false
        Target.PrimaryPart:ApplyImpulse(Attacker.PrimaryPart.CFrame.LookVector * 1000)

        if FaceDirection and FaceDirection == true then
            Target.PrimaryPart.CFrame = CFrame.new(Target.PrimaryPart.Position, Attacker.PrimaryPart.Position)
        end

        task.delay(Length, function()
            Target:FindFirstChildWhichIsA("Humanoid").AutoRotate = true
            if OnEnd then OnEnd() end
        end)
    --end
end

I attmpted to lower the power but all that happens is that the dummy wont move or a very small distance

Try changing the Density of the Dumymy and lower the power

I made one of the dummy’s massless, and while the knockback is a lot better, for some reason it doesn’t look as linear as BodyVelocity if you understand what i mean. Rather here’s a video

https://streamable.com/o7o7xn

Have you tried with LinearVelocity? I heard BodyVelocity is deprecated
(I also don’t see anything wrong with the knock back sorry)

I think this might be a networking issue. Try doing Dummy.HumanoidRootPart:SetNetworkOwner(nil)

Linear velocity works the same or even worse than ApplyImpulse
I may have to resort to BodyVelocity at this point even with it’s issues

Pretty sure it’s already owned by the server, but even after doing that I get the same result

Only thing I can think of to solve this is Tweens, but that’s very bad practice…

I definitely don’t want to resort to tweens

EDIT:
I’ve gotten ApplyImpulse to look a lot better now, though it’s only when I have it on massless, is there a way to fix that?

Fixed the issue, did some math with the mass and then realised my kicking animation was causing the issue for the knockback as it only got the LookVector when the animation was looking back

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