Ragdoll instead of death

Hey i’m devfoll and i’m not searching for any scripts but i’m wondering how i would make a player ragdoll like da hood on death like u don’t respawn until i stomp on the guy. I have a few things in mind tho, is it like i must change it so when the player hits 1 hp he ragdolls and can’t get dealt more damage until a person stomp on him using a .Touched event? or is there another way to disable players death?

3 Likes

You can see the difference between player’s health and the semifinal damage.

Damage = 10

Health = 2

if Damage >= Health then
    Health = 1
else
    Health -= Damage
end
2 Likes

You should use local script inside character scripts and desactive the dead state from humanoid.

And when the player stomps, you respawn the player.

2 Likes

In a local script under StarterCharacterScripts:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")

hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false) -- disables death!

hum.HealthChanged:Connect(function(hp)
	if hp <= 0 then
		-- ragdoll
	end
end)
1 Like

But shouldn’t i use a remote event since won’t the ragdoll only show on the client side and not be visible to other players?

1 Like

i know that bro but i don’t wanna do it inside every single damage script

You should handle your damage through one script, and call a function to do damage. In that function you can handle the ragdoll damage checks.

I can’t im doing a commission and im looking for a way to make the ragdoll script work forever.

if you use normal roblox deaht instead of disabling it you can just do humanoid.Died:Connect(function() without doing ab unch of scripts