local Event = game.ReplicatedStorage.Ragdoll
Event.OnServerEvent:Connect(function(Player, Key)
if Key == "ragdoll" then
local Humanoid = Player.Character.Humanoid
Humanoid.BreakJointsOnDeath = false
for i, v in pairs(Player.Character:GetDescendants()) do
if v:IsA("Motor6D") then
local socket =
Instance.new ("BallSocketConstraint")
local a =
Instance.new ("Attachment")
local b =
Instance.new ("Attachment")
a.Parent = v.Part0
b.Parent = v.Part1
socket.Parent = v.Parent
socket.Attachment0 = a
socket.Attachment1 = b
a.CFrame = v.C0
b.CFrame = v.C1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
v:Destroy()
end
end
end
end)