I need help to make low health ragdoll

I need help for making low ragdoll For my game.
I need someone help me to low health ragdoll and get up script.
So be honest i does not know how to script but i know how to some script, I just need help for low health ragdoll.

Here a script.

game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c.Humanoid.BreakJointsOnDeath = false
c.Humanoid.Died:Connect(function()
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.Parent
				
				v:Destroy()
			end
		end
		c.HumanoidRootPart.CanCollide = false
	end)
end)

end)

Also this is first time using Dev Forum.

game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c.Humanoid.BreakJointsOnDeath = false
c.Humanoid.Died:Connect(function()
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.Parent
				
				v:Destroy()
			end
		end
		c.HumanoidRootPart.CanCollide = false
	end)
end)

end)

Repost Script.

hmm, i know i am late but this might help you

ragdolling = false
–going down(add at the end of your ragdoll)
Humanonoid:ChangeState(Enum.HumanoidStateType.Physics)
Ragdolling = true
HumanoidRootPart.CanCollide = false-- include this if your ragdoll does not include it already

–getting up
local PlayerParts = Character:GetDescendants()
if Ragdolling == true then
for i,M6DBSC in pairs(PlayerParts) do
if M6DBSC:IsA(SocketType) then – change to your socket type
M6DBSC:Destroy()-- destroy socket
elseif M6DBSC:IsA(“Motor6D”) then
M6DBSC.Enabled = true-- enables motor6d
end
end
HumanoidRootPart.CanCollide = true
Humanonoid:ChangeState(Enum.HumanoidStateType.GettingUp)

1 Like

Do i have to put it in StarterCharac ?