hey! im working on improving my coding abilities. i was interested in physics side of roblox and decided to work on a ragdoll script with a few resources. whenever my ragdoll is ran it works but the only issue is that the limbs have a spasm and the person goes flying.

As seen here

Any idea how to fix it would be appreciated here is the ragdoll script :):

Seems like the code is too large! Here's the pastebin link.

https://pastebin.com/LXJL1vdb