Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to script ragdoll that my humanoid will be ragdoll after getting damaged too much?

Asked by 3 years ago

So i need to make that if humanoid have low hp he will become ragdoll

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

here's a ragdoll on death script if that's ok with you.

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:GetDescendants()) 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.Attachment0 = Att0
     BSC.Attachment1 = Att1
     BSC.Parent = v.Part0

     v:Destroy()
    end
   end
   Char.HumanoidRootPart.CanCollide = false
  end)
 end)
end)

just get a script and put it in ServerScriptService

0
I need to do the ragdoll not on death. Like i need to some "knoncked" statement DudeNumber156 0 — 3y
Ad

Answer this question