How do I apply knockback while ingoring the mass?

I want to apply knockback to a character but ingore the mass because bigger characters get knockbacked less

NPCToAttack.HumanoidRootPart:ApplyImpulse(NPCAttacking.HumanoidRootPart.CFrame.LookVector * NPCAttacking.Humanoid:GetAttribute("KnockbackSpeed") * 3)

I tried to multiply by the mass of the character but the character that is bigger got knockbacked more

Seems like you could just set AssemblyLinearVelocity instead of using ApplyImpulse. The entire purpose of the ApplyImpulse function is to take assembly mass into account. AssemblyLinearVelocity will behave the same across all assemblies of any mass (friction plays a role too but it’s negated for our purposes.)

Green blocks use AssemblyLinearVelocity, Red use ApplyImpulse. All blocks getting value of Vector3.new(50, 0, 0)

You can use this system that you currently have with the ApplyImpulse method. However, you will need to multiply it by the assembly mass, with the AssemblyMass property of the part.

This issue is most likely a result of some sort of humanoid physics. Changing the state to Physics will most likely fix the issue.

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