Heyo! Today I am making a R to ragdoll thing but I can't seem to make the unragdoll work and the ragdoll floats up instead of having gravity.
Sorry for the dogey title, had to add a question mark.
Here is the death script:
local function ragdoll(c)
for _, v in pairs(c: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()
for e, v in pairs(c:GetChildren()) do
if v:IsA("Part") then
v.CanCollide = true
end
end
end
end
c.Head.CanCollide = true
c.HumanoidRootPart.CanCollide = false
end
game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(ch)
ch.Humanoid.BreakJointsOnDeath = false
ch.Humanoid.Died:Connect(function()
ragdoll(ch)
end)
end)
end)
And I am trying to convert it. Here is the currently "converted" script
local function ragdoll(c)
for _, v in pairs(c: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()
for e, v in pairs(c:GetChildren()) do
if v:IsA("Part") then
v.CanCollide = true
end
end
end
end
c.Head.CanCollide = true
c.HumanoidRootPart.CanCollide = false
end
local function unragdoll(c)
for _, v in pairs(c:GetDescendants()) do
if v:IsA("BallSocketConstraint") or v:IsA("Attachment") then
v:Destroy()
end
end
end
game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(ch)
wait(4)
ragdoll(ch)
wait(4)
unragdoll(ch)
end)
end)
Any help on making the ragdoll not float and a unragdoll? The current unragdoll just kills the player. Taking off the Attachments/BSocketConstraints from a body part causes it to just fall off.
NOTE: I think it keeps loop-ragdolling some odd reason.

8 comments
How would I do that?
Also I turned off platform stand but it did nothing
And platform stand is already off
You'd just make the ballsocket's parent v's Parent and put v in smth like replicated or server storage, then when you wanna, place the motor6ds back by inserting them based on the name of the attachments
Ah ok
Wait I turned on platFormStand and it helped hang on.
yeah mb, i meant on at first
Now the camera goes crazy (moving with the arms) and arms go through the floor AND the player still has footstep sounds and last but not least, I dont know how to I would parent all the stuff to a folder