Advertisement
Guest User

Roblox Ragdoll Death Script

a guest
Jun 1st, 2022
2,292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(Player)
  2. Player.CharacterAdded:Connect(function(Char)
  3. Char:WaitForChild("Humanoid").BreakJointsOnDeath = false
  4. Char.Humanoid.Died:Connect(function()
  5. for _, v in pairs(Char:GetDescendants()) do
  6. if v:IsA("Motor6D") then
  7. local Att0, Att1 = Instance.new("Attachment"), Instance.new("Attachment")
  8. Att0.CFrame = v.C0
  9. Att1.CFrame = v.C1
  10. Att0.Parent = v.Part0
  11. Att1.Parent = v.Part1
  12. local BSC = Instance.new("BallSocketConstraint")
  13. BSC.Attachment0 = Att0
  14. BSC.Attachment1 = Att1
  15. BSC.Parent = v.Part0
  16.  
  17. v:Destroy()
  18. end
  19. end
  20. Char.HumanoidRootPart.CanCollide = false
  21. end)
  22. end)
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement