How do i make a corpse out of a players old body when they die/respawn?

it didnt work at all, My avatar freezes completely and dissapears after i respawn, I did put the scripts in serverscriptservice too

Probably because youā€™re not using an r15

do you know why when you are ragdolled and you clone Character, the corpse is standing up instead of being ragdolled?

Iā€™ve read 2 other articles with the same issue and no solution. You have an idea? I set network owner to nil as well, but that didnā€™t work.

You should remove humanoid then, it works perfectly for me.

1 Like

How would you keep clothing on?

One of the hardest things Iā€™ve ever tried to do in Roblox. Just wow!
Had to actually go to pure research. This is a modified code from many.
With many attempts ā€¦ :joy:

Imgur

Good luck with this!
--non-local script in StarterCharacterScripts

local debris = game:GetService('Debris')
local character = script.Parent
local player = game.Players:GetPlayerFromCharacter(script.Parent)
local humanoid = character:WaitForChild('Humanoid')
local bodyDisposeTime = 180 -- how long the body stays

humanoid.Died:Connect(function()
	if player ~= nil and humanoid ~= nil then
		character.Archivable = true
		script.Parent = game.ServerScriptService

		local cloneChar = character:Clone()
		cloneChar.Name = "Deadbody" .. tostring(math.random(1, 10000))

		if workspace:FindFirstChild(cloneChar.Name) then
			workspace:FindFirstChild(cloneChar.Name):Destroy()
		end	
		task.wait(0.1)
		cloneChar.Parent = workspace

		local rootPart = cloneChar.HumanoidRootPart or cloneChar.Torso
		local clonedHumanoid = cloneChar:FindFirstChildOfClass("Humanoid")
		cloneChar:MoveTo(rootPart.Position)

		rootPart.Orientation = Vector3.new(90,0,0)
		clonedHumanoid.PlatformStand = true
		clonedHumanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		clonedHumanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff

		for i, v in pairs(cloneChar:GetChildren()) do
			if v:IsA("BasePart") then
				v.Anchored = false
				v.CanCollide = false
			end
			if v:IsA("Script") or v:IsA("LocalScript") then
				v:Destroy()
			end
		end

		if cloneChar:FindFirstChild("ForceField") then
			cloneChar.ForceField:Destroy()
		end

		character.Parent = game:GetService("ServerStorage")

		debris:AddItem(cloneChar,bodyDisposeTime)
		debris:AddItem(script,bodyDisposeTime)	

		task.wait(1)

		if rootPart.Orientation ~= Vector3.new(90,0,0) then
			rootPart.Orientation = Vector3.new(0,0,0)
		end

		task.wait(3)
		rootPart.Locked = true
		rootPart.Anchored = true
	end
end)

This part is a bit cheesy, but a counter didnā€™t work out.
If it hits the same number a body will be removed.

cloneChar.Name = "Deadbody" .. tostring(math.random(1, 10000))
2 Likes

Hey a bit late but can I try your game assuming itā€™s done now?

1 Like

Does clothing fall off? It works perfectly for me.

1 Like

Are you talking about my posted code. You can see Iā€™m standing there with many accessories on and so are the dead bodies ā€¦

< you need to click this to see the code

In my other post

1 Like

Clothing and accessories fall off!

Will try! Actually how come you anchored rootpart?

So I couldnā€™t kick it around when I ran into it. Sometimes it rolled into the ground.

1 Like

Dang man. Yeah creating a ragdoll dummy to move is complicated!

I didnā€™t use ragdoll ā€¦ ends up looking the same. You want to kick it around donā€™t use ā€¦
rootPart.Locked = true
rootPart.Anchored = true

1 Like

yeahā€¦ itā€™s pretty simple. Ask chatgpt to do it

1 Like

Oh shoot, I just noticed there was no ragdoll on the dummies. Iā€™m struggling in making character clone ragdolled without getting back up. Itā€™s like the humanoid is still alive, but there is 0 health.

ChatGTP is a dumb programmer. I have to teach it to program, not the other way around.

1 Like

The dummies are dead. A ragdoll will look exactly the same as this when they are put down.
Now you want to kick around a ragdoll too? ā€¦ this hacky code barley works as is.

1 Like

For some reason they are rising from the dead I think only on the client. There seems to be a link with the character and the clone. I used :SetNetworkOwner(nil) and it still rises from the dead right after ragdolling.

Thus the:

task.wait(3)
rootPart.Locked = true
rootPart.Anchored = true

1 Like