I know scripting and the logic but i forgot Lua mainly it goes like:

If the thing that hits the ragdoll is an explosion it deletes the thing in the arm or torso named "Hinge" so then if the ragdoll is hit with an explosion only a certain thing would be removed that i wanted to like arms or torso but if bullets hit it then no arms would fall of and the whole ragdoll would stay together.