How would I create an executable ragdoll system?

this may be inefficient but what i did is just make a table for which Motor6Ds to remove (well i just put it in a folder in serverstorage)

local Motor6Ds = {
    "name1",
    "name2",
    "name3",
    "name4"
}

then when i need to find if a certain Motor6D is one that needs to be removed, i check the name and if it’s in the table i remove it

noooo i mean replacing motor6ds work, but when i do that, my humanoid root part goes crazy

can i see your code? i don’t have mine right now but i’ll see what you have if there’s any errors