---Exemplo De Uso | RagdollMD.RagDoll(workspace["Combat Test"],3)


function ActiveRagdoll(plr,Seconds)
	local character = plr
	local humanoid = character.Humanoid
	character.HumanoidRootPart.Massless = true
	humanoid:ChangeState(Enum.HumanoidStateType.Physics)
	for _, v in pairs(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.Enabled = false
		end
	end
	delay(Seconds,function()
		for _,v in pairs(character:GetDescendants()) do
			if v:IsA('Motor6D') then
				v.Enabled = true
			end
			if v.Name == 'BallSocketConstraint' then
				v:Destroy()
			end
			if v.Name == 'Attachment' then
				v:Destroy()
			end
			character.HumanoidRootPart.Massless = false
			humanoid.PlatformStand = false
			humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll,false)
		end
	end)
end


module.RagDoll = function(plr,Seconds)
	spawn(function()
		ActiveRagdoll(plr,Seconds)
	end)
end


return module
