How to make corpse when player dies

Like this ?

local function ConnectLimbs(char)
	char = char:Clone() 
	char.Parent = workspace
	game:GetService("Debris"):AddItem(char, 300)
	for i, limb in pairs(char:GetChildren()) do
		if limb:IsA("BasePart") then

Nah it doesn’t work, it only clones the model

So I would recommend setting it to 3 instead of 300 for testing and checking to see if it gets removed after the 3 seconds.

Ok it delete correctly, problem is that it shows the player name and health, which isn’t what I’m searching to do

Maybe :
char.Humanoid.NameDisplayDistance = 0
– Edit –
Doesn’t work

char.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
char.Humanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
This should work.

Why? Lmao
Something is wrong with the char things

Lol
– Edit –
It seems that it always join this position, no matter how the player die

Not too sure why that happens, if you are using the code I provided that shouldn’t really be a problem.

2 Likes

Sorry for the really late reply but I have a way which kind of works.

--please excuse any errors or mistakes.
local char=script.Parent --put in StarterCharacterScripts
local old=game.ServerStorage:FindFirstChild(char.Name.."dead") --check for corpse in SStorage
if old then
	old.Parent=workspace --Put it in workspace
end
local human=char:WaitForChild("Humanoid") --reference humanoid
human.BreakJointsOnDeath=false --for ragdolling
human.Died:Connect(function() --on death
	for i,motor in ipairs(char:GetDescendants()) do
		if motor:IsA("Motor6D") then
			local s=Instance.new("BallSocketConstraint")
				local a0=Instance.new("Attachment")
				local a1=Instance.new("Attachment")
				a0.Parent=motor.Part0 --ragdoll code
			    a1.Parent=motor.Part1
			s.Parent=motor.Parent
			s.Attachment0=a0
			s.Attachment1=a1
			a0.CFrame=motor.C0
			a1.CFrame=motor.C1
			s.LimitsEnabled=true
			s.TwistLimitsEnabled=true
			motor:Destroy()
			end
	end
	task.wait(game.Players.RespawnTime-.5)
	local f=Instance.new("Model",game.ServerStorage) f.Name=char.Name.."dead" --create corpse
	for i,part in char:GetChildren() do
		if part:IsA("BasePart") or part:IsA("JointInstance") or part:IsA("Accessory") or part:IsA("Humanoid") then
			if part:IsA("BasePart") then
				part.Anchored=true --This is to prevent a weird glitch where the corpse rises from the dead on client
			end
			part:Clone().Parent=f
		end
	end
end)

Unfortunately, it doesn’t work properly without anchoring the parts. So you won’t be able to move the corpse around.

1 Like

I have a good solution to this rodeo, but I might be a little too late since this hasn’t been touched since April.

-- ur previous ragdoll stuff above

task.wait(game.Players.RespawnTime - 0.05)

char.Archivable = true
local charclone = char:Clone()
charclone.Parent = workspace

debris:AddItem(charclone, 300)

charclone:FindFirstChild("Humanoid").PlatformStand = true

for i, limb in pairs(char:GetDescendants()) do
      if limb:IsA("BasePart") and limb.Name ~= "Handle" then
             local hitbox = Instance.new("Part", limb)
             hitbox.Transparency = 1
             hitbox.Size = limb.Size
             hitbox.CFrame = limb.CFrame
             hitbox.CanCollide = false
             local limbweld = Instance.new("WeldConstraint", hitbox)
             limbweld.Part0 = hitbox
             limbweld.Part1 = limb
      end
end

Also, just saying, it might also be good to delete or weld the humanoidrootpart to the torso once the player dies so the ragdoll doesn’t become choppy.

Tell me if it works.

1 Like