I'm making a whodunnit game and I want a good ragdoll script. I have been trying all day to make a ragdoll on death script so when you die your body stays there and so I would be able to clean it with a gui button. I really need help. I can't make it I have tried. I might of confused you so I will try to explain with detail what I am trying to make. I am trying to make a ragdoll on death script so when you die your body stays there. Only a certain team can have ragdolls though. Like I want only the Housemates to have the ragdoll script so when they die their body stays and in spawn they can't make more bodies. And then I would need a script so after the game is done it cleans all of the ragdolls. Do you think that is possible? Please get back to me as soon as you can! Thanks ~Zel
I use this one i found from one of those murder mystery games. I stays after the character respawns, and keeps the cloths on.
Simply insert this into the character on spawn
parent=game.Workspace.Player1
Gibs = game.Workspace function OnDeath(Character) local svch = Character local hum = Character:findFirstChild("Humanoid") Character.Archivable = true local chrclone = Character:clone() Character.Archivable = false local ch = chrclone:GetChildren() local i for i = 1,#ch do if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then ch[i]:remove() end end local function Scan(ch) local e for e = 1,#ch do Scan(ch[e]:GetChildren()) if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then ch[e]:remove() end end end Scan(chrclone:GetChildren()) local hum2 = chrclone:findFirstChild("Humanoid") if hum2 ~= nil then hum2.Name = "Humanoid2" hum2.PlatformStand = true hum2.Sit = true hum2.MaxHealth = 0 hum2.Health = 0 end local ch = Character:GetChildren() local i for i = 1,#ch do if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then ch[i]:remove() end end wait(0.2) local ch = Character:GetChildren() local i for i = 1,#ch do if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then ch[i]:remove() end end Character = chrclone Character.Name="" local Torso = Character.Torso local movevector = Vector3.new() if Torso then local Head = Character:FindFirstChild("Head") if Head then local Neck = Instance.new("Weld") Neck.Name = "Neck" Neck.Part0 = Torso Neck.Part1 = Head Neck.C0 = CFrame.new(0, 1.5, 0) Neck.C1 = CFrame.new() Neck.Parent = Torso local nsc = script.CamAttach:clone() nsc.CamPart.Value = hum2.Parent.Head nsc.Disabled = false nsc.Parent = svch end local Limb = Character:FindFirstChild("Right Arm") if Limb then Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) local Joint = Instance.new("Glue") Joint.Name = "RightShoulder" Joint.Part0 = Torso Joint.Part1 = Limb Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) Joint.Parent = Torso local B = Instance.new("Part") B.TopSurface = 0 B.BottomSurface = 0 B.formFactor = "Symmetric" B.Size = Vector3.new(1, 1, 1) B.Transparency = 1 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) B.Parent = Character local W = Instance.new("Weld") W.Part0 = Limb W.Part1 = B W.C0 = CFrame.new(0, -0.5, 0) W.Parent = Limb end local Limb = Character:FindFirstChild("Left Arm") if Limb then Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) local Joint = Instance.new("Glue") Joint.Name = "LeftShoulder" Joint.Part0 = Torso Joint.Part1 = Limb Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) Joint.Parent = Torso local B = Instance.new("Part") B.TopSurface = 0 B.BottomSurface = 0 B.formFactor = "Symmetric" B.Size = Vector3.new(1, 1, 1) B.Transparency = 1 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) B.Parent = Character local W = Instance.new("Weld") W.Part0 = Limb W.Part1 = B W.C0 = CFrame.new(0, -0.5, 0) W.Parent = Limb end local Limb = Character:FindFirstChild("Right Leg") if Limb then Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0) local Joint = Instance.new("Glue") Joint.Name = "RightHip" Joint.Part0 = Torso Joint.Part1 = Limb Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) Joint.Parent = Torso local B = Instance.new("Part") B.TopSurface = 0 B.BottomSurface = 0 B.formFactor = "Symmetric" B.Size = Vector3.new(1, 1, 1) B.Transparency = 1 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) B.Parent = Character local W = Instance.new("Weld") W.Part0 = Limb W.Part1 = B W.C0 = CFrame.new(0, -0.5, 0) W.Parent = Limb end local Limb = Character:FindFirstChild("Left Leg") if Limb then Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0) local Joint = Instance.new("Glue") Joint.Name = "LeftHip" Joint.Part0 = Torso Joint.Part1 = Limb Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) Joint.Parent = Torso local B = Instance.new("Part") B.TopSurface = 0 B.BottomSurface = 0 B.formFactor = "Symmetric" B.Size = Vector3.new(1, 1, 1) B.Transparency = 1 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) B.Parent = Character local W = Instance.new("Weld") W.Part0 = Limb W.Part1 = B W.C0 = CFrame.new(0, -0.5, 0) W.Parent = Limb end --[ local Bar = Instance.new("Part") Bar.TopSurface = 0 Bar.BottomSurface = 0 Bar.formFactor = "Symmetric" Bar.Size = Vector3.new(1, 1, 1) Bar.Transparency = 1 Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0) Bar.Parent = Character local Weld = Instance.new("Weld") Weld.Part0 = Torso Weld.Part1 = Bar Weld.C0 = CFrame.new(0, 0.5, 0) Weld.Parent = Torso --]] end Character.Parent = Gibs game.Debris:AddItem(Character, 1000)--despawn in 1000 seconds, you can change this --Only if you want a funny death... --Character.Torso.RotVelocity=Vector3.new(70,200,70) --wait() --Character.Torso.Velocity=Vector3.new(0, 250,0) --game.Chat:Chat(Character.Head,"Ouch!",2) end script.Parent.Humanoid.Died:connect(function() OnDeath(script.Parent) end)