Problem with ragdoll physics when attacking with a weapon

I tried to make a melee system with line trace. Also i made so that when an enemy dies it ragdolls. I’ve even added impulse, so that it doesn’t just fall flat from standing position. The problem is that the impulse works only when you attack standing as close as you can. When you attack from even a little distance, the ragdoll still works, but has no impulse. I can’t understand where i screwed up, in nodes or somewhere else.