I tried to make a ragdoll script, but it just flies the character like a bird.
I tried a lot of stuff to fix it but it is still the same.
Is there a way I could fix this?
Code
Player.Character.Humanoid.WalkSpeed = 0
for _, v in pairs(Player.Character:GetDescendants()) do
if v:IsA("Motor6D") then
local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
a0.CFrame = v.C0
a1.CFrame = v.C1
a0.Parent = v.Part0
a1.Parent = v.Part1
local b = Instance.new("BallSocketConstraint")
b.Attachment0 = a0
b.Attachment1 = a1
b.Parent = v.Part0
v:Destroy()
end
end