Hello!
I’m trying to create a ragdoll system that enables on death along with a corpses.
The ragdoll portion of the script functions perfectly, however when I attempt to clone the ragdolled character, it stands upright (with the limbs freely swinging)
This is my script in ServerScriptService:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char.Humanoid.BreakJointsOnDeath = false
char.Humanoid.RequiresNeck = false
char.Humanoid.Died:Connect(function()
for _, v in pairs(char:GetDescendants()) do
if v:IsA("Motor6D") then
print(v.name)
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 bsc = Instance.new("BallSocketConstraint")
bsc.Parent = v.Parent
bsc.Attachment0 = a0
bsc.Attachment1 = a1
v:Destroy()
end
end
--[[
char.Archivable = true
local dupe = char:Clone()
dupe.HumanoidRootPart.CanCollide = false
dupe.Parent = workspace
dupe.Humanoid.DisplayName = " "
char.Archivable = false
char:Destroy()
]]--
end)
end)
end)
