Theirs no errors in the output, heres the script, also the Parent of the script is ServerScriptService.
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
Char:WaitForChild("Humanoid").BreakJointsOnDeath = false
Char.Humanoid.Died:Connect(function()
for _, v in pairs(Char:GetDescendats()) do
if v:IsA("Motor6D") then
local Att0, Att1 = Instance.new("Attachment"), Instance.new("Attachment")
Att0.CFrame = v.C0
Att1.CFrame = v.C1
Att0.Parent = v.Part0
Att1.Parent = v.Part1
local BSC = Instance.new("BallSocketConstraint")
BSC.Attatchment0 = Att0
BSC.Attachment1 = Att1
BSC.Parent = v.Part0
v:Destroy()
end
end
Char.HumanoidRootPart.CanCollide = false
end)
end)
end)