I need help adding a ragdoll to this script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    a ragdoll after the player dies and gets cloned

  2. What is the issue? Include screenshots / videos if possible!
    none, i just simply dont know how

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    no

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

So ive been working on a script where if the player dies he gets cloned, but i want to add a ragdoll too, could anyone tell me how to do it or even better give me a finished script? Thanks for reading!

local players = game:GetService("Players")

local function makeDup(char)
	char.Archivable = true
	local dChar = char:Clone()
	char.Archivable = false
	dChar.Parent = workspace
	for i, v in pairs(char:GetDescendants()) do
		if v:IsA("BasePart") then
			v.CanCollide = false
			v.Anchored = true
			v.Transparency = 1
		end
	end
	local healthScript = dChar:FindFirstChild("Health")
	if healthScript then
		healthScript.Enabled = false
	end
end

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		hum.Died:Connect(function()
			print("Player Has Died!", player.Name)
			makeDup(char)
		end)
	end)
end)

I have a script that i use for player ragdoll deaths that is also server sided. Im on phone right now, but ill send it in a sec.

heres the script. put this into starterCharacteScripts.

Ragdoll.rbxm (4.8 KB)

is this R6 or R15? Also thanks alot, needed it!

1 Like

late reply sorry- R6 only. I dont know how to make an r15 one