#Ragdoll remains after death

1 messages · Page 1 of 1 (latest)

weak hemlock
#

Hey I recently been trying to learn all this cloning stuff but I have no idea how to make it where the players ragdoll remains as a body after death. I've tried alot but they end up way different than my ragdoll or broken. I have 2 scripts, ny activator ragdoll and my module

#

That's the activator

#

There's the module since its too giant. Also ignore the hitbox and sound stuff, im gonna solve that later

#

Ragdoll remains after death

pseudo fjord
#

I see your going through everything then cloning every individual thing

#

I’d clone the full character then destroy the humanoid of the clone then do what you need like setToRagdoll or whatever(not real)

#

and set the poition or pivot to the og character

weak hemlock
#

cuz im not that good wit hthat stuff so u might have to guide me with this thing

#

so what commands and where would i put them cuz i am confused with the cloning stuff. it feels complicated for me

#

@pseudo fjord

pseudo fjord
#

Yeah

weak hemlock
#

Ok where would i put them in my activator script?

pseudo fjord
#

Char:clone
—find clone humanoid
If humanoid then
Humanoid:destroy
end

cloneChar:pivorTo(Char)

#

sorry I’m on my phone 💀 hold on

weak hemlock
#

alg bro. Your like the only person that decided to help me so

#

idc how long u take

#

so do i place this right above the setragdoll?

#

cuz thats what bascally triggers it if u look at my modul

pseudo fjord
#

Yeah basically

#

It’s a lot more simpler than looping through it all

#

I’d say that codes more impressive than the working one lol

weak hemlock
#

would it look like this

#

local module = require(game.ReplicatedStorage.ragdollmodul)

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char.Humanoid.BreakJointsOnDeath = false
char.Humanoid.Died:Connect(function()
char:Clone()
--—find clone humanoid
if humanoid then
humanoid:Destroy()
end
module.SetRagdoll(char)
char:Clone()
char.Parent = workspace
end)
end)
end)

pseudo fjord
#

Yeah minus the second char:Clone()

weak hemlock
#

ok

old kelpBOT
#

studio** You are now Level 3! **studio

pseudo fjord
#

Nice job

weak hemlock
#

also near humanoid part it says unknown

#

global ting

#

cuz i want the body to stay

#

as like a corpse

#

then after alittle it goes away

pseudo fjord
#

Yeah hold on I’m going on my computer rn

weak hemlock
#

ok

pseudo fjord
#

You’ll have to use debris

weak hemlock
#

oh

#

idk how to do that

pseudo fjord
#

I like to listen to brawl dev, he has a vid on his advanced scripting series but I'll write an example

weak hemlock
#

also when i used the script it didnt clone

#

i think we gotta parent it

pseudo fjord
#

lol yeah

weak hemlock
#

but to do that we need a local or smth

#

cuz like

#

the humanoid is unknown global apparently

pseudo fjord
#
char.Humanoid.Died:Connect(function()
local ragdollClone = char:Clone()
ragdollClone:FindFirstChildOfClass("Humanoid"):Destroy
--destroy any scripts too
ragdollClone.Parent = workspace
ragdollClone:PivotTo(char:GetPivot())

module.SetRagboll(ragbollClone)
end)

#

dang I'm bad at doing scripts on here

#

but like thats the just you just have to include debris

weak hemlock
#

will ths work for the clone tho

pseudo fjord
#

yeah I think sorry I was looking for the function

#

its because it uses Motor6d joins and all

#

what was the function for ragdoll? I've never used it I'm looking for documentation 💀

weak hemlock
#

look back at the old pciture

pseudo fjord
weak hemlock
#

it has all the stuff i nthere

#

module.SetRagdoll

pseudo fjord
#

oh shoot I'm an idiot

#

I rthought it was a roblox thing lol mb, I never do ragdoll stuff

#

try it then

weak hemlock
#

ok

#

hm thats weird

#

my characters ragdoll doesnt tirgger

#

it just stays in an idle on reset

#

idk its not workin

#

why is making a ragdoll corpse so complicated

#

omg wha do i do

weak hemlock
#

@pseudo fjord

#

i figured it out

pseudo fjord
#

oh bruh I didn't even know you messaged in here mb 💀

weak hemlock
#

it works but the ragdoll has a ug

#

bug

pseudo fjord
#

I'm curious what was it

weak hemlock
#

lemme show u

pseudo fjord
#

yea

weak hemlock
#

so u know the health?

pseudo fjord
#

yeah

weak hemlock
#

the clone doe the ragdoll and stuff correctly

#

its just that the health bar pops up on the body

#

and then it just sloly heals or smth

old kelpBOT
#

studio** You are now Level 4! **studio

pseudo fjord
#

lol oh

#

so what did you fully kill it or something

weak hemlock
#

hers the code

#

local module = require(game.ReplicatedStorage.ragdollmodul)

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char.Humanoid.BreakJointsOnDeath = false
char.Humanoid.Died:Connect(function()
module.SetRagdoll(char)

        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
                char.Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
                char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
                
            end
        end
    end)

end)

end)

#

thats how i fixed it

#

lemme show u the health bug tho

pseudo fjord
#

oh lol yeah thats good

weak hemlock
pseudo fjord
#

so thats the new rag doll?

weak hemlock
#

yea

#

the corpse

#

but the hp bar shows up

#

what command to set the helath 0?

pseudo fjord
#

check it in the workspace and its childs it still has the humanoid part

#

you have to delete the humanoid in ur script when you clone it

#

oh wait but ur using it for ragdoll too

weak hemlock
#

yea

#

if i delete the ragdoll will go naked lol

#

the humanoid i meant

pseudo fjord
#

lol nice

weak hemlock
#

what command sets the humanoid health to 0?

pseudo fjord
#

idk I'm looking on roblox studio, theres a DisplayName that you should set to blank or ""

weak hemlock
#

how do i do that?

#

what line

pseudo fjord
#

you have to set the HealthDistanceType and HumanoidDisplayDistanceType

weak hemlock
#

set to 0?

pseudo fjord
#

Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None

#

Humanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.Never

#

look in api, it helps

#

tell me if it works too, like ping me

weak hemlock
#

my ragdoll clone doesnt wanna work now

#

it keeps standing up or smth

#

@pseudo fjord

pseudo fjord
#

💀

#

that shouldn't. hold on

weak hemlock
#

also not because the halth thing

#

it was buggin out before i added that

pseudo fjord
#

its cause humanoid is still active

#

before you call SetRagdoll I think you gotta destroy all ur scripts and Animator

weak hemlock
#

how

pseudo fjord
#

I'm looking at the standard character rn

#

if you play you can look in workspace and view the scripts that have to be deleted

#

oh wait I found something else

old kelpBOT
#

studio** You are now Level 7! **studio

pseudo fjord
#

you can set humanoid:ChangeState(Enum.HumanoidStateType.Physics)

then set all these enum.HumanoidStatetype to false
humanoid:SetStateEnabled(Enum,HumanoidStateType. ..., false)

.GettingUp, .Seated, .Climbing, .Swimming

#

if you look through the api under Humanoid you can run into these things

weak hemlock
#

k

weak hemlock
#

@pseudo fjord it fr dont wanna work

#

when i clone the player, the clone doesnt have the settings enaled. im trying to figure out why

#

@pseudo fjord

pseudo fjord
#

do it after cloning and to the clone humanoid mb

weak hemlock
#

ok

#

why isnt it workin

weak hemlock
#

@pseudo fjord its not workin