Help with a ragdoll script

  1. What im trying to do.
    I’m attempting to fix a ragdoll script that was a incomplete commission from someone.
    The script ragdolls you when 50 damage is done within 3 seconds Then it waits 8 to 15 seconds and unragdolls you. Currently he made it so
    if your under 50 health you keep ragdolling. Which is not what i want it to do. It also does not activate as soon as this damage is done, It activates a few seconds after. Im a very good scripter but i’m willing to learn some stuff to be able to complete this.

  2. What solutions have you tried so far?
    I’ve only been looking at other peoples scripts for things related to this but it’s not really
    working. I attempted to change the under 50 health part i ended up breaking it so i just
    ctrl-z’d it.

  3. The scripts.


im using this ragdoll system R15 / Rthro Ragdolls - #4 by Nightcaller

Any help would be amazing.

5 Likes

I dont know how to fix this, but next time to make things easier for devs you should paste the script with ``

4 Likes

You could try messaging or pinging Echo, since he made the script.

I’m sure he could come up with a fix in a few minutes, he’s a top contributor so he usually helps players anyway.

line 17 in the RagdollMe script looks strange to me.

That whole function looks strange, actually- it doesn’t belong in a ragdoll script

@EchoReaper A user said i would be able to msg you about this, Here’s the code. I have no idea how to fix this and i think the commissioner did it wrong as you ragdoll when your under 50 health not when you take 50 damage within 3 seconds. You also “reanimate” after dying. Heres the script’s

local charhealthlist = {} local charnamelist = {} while wait(3) do for i,v in pairs(game.Players:GetChildren()) do local plr = v local char = v.Character or v.Character:Wait() if char then local inlist = false for i,v in pairs(charnamelist) do if v == char.Name then inlist = true local v = charhealthlist[i] if v - char.Humanoid.Health >= 50 then v = char.Humanoid.Health print(v) game.ReplicatedStorage.Ragdoll:FireClient(plr) local sound = game.Workspace.Sounds:FindFirstChild("Ragdoll_" .. math.random(1,4)) if sound then local sclone = sound:Clone() sclone.Parent = char.Head sclone:Play() print("Played") wait(4) sclone:Destroy() end end break end end if inlist == false then table.insert(charnamelist, char.Name) table.insert(charhealthlist, char.Humanoid.Health) end end end end

2nd script

local character = script.Parent
local humanoid = character.Humanoid
local notinragdoll = true

game:GetService(“ContextActionService”):BindAction(“Ragdoll me”, function(_,input)
if input == Enum.UserInputState.Begin then
local setEnabled = humanoid:GetState() ~= Enum.HumanoidStateType.Physics
humanoid:ChangeState(setEnabled and Enum.HumanoidStateType.Physics or Enum.HumanoidStateType.GettingUp)
character.Animate.Disabled = setEnabled

	if setEnabled then
		for _,v in pairs(humanoid:GetPlayingAnimationTracks()) do
			v:Stop(0)
		end
	end
end

end, false, Enum.KeyCode.V)

game.ReplicatedStorage.Ragdoll.OnClientEvent:Connect(function()
notinragdoll = false
local setEnabled = true
humanoid:ChangeState(setEnabled and Enum.HumanoidStateType.Physics or Enum.HumanoidStateType.GettingUp)
character.Animate.Disabled = setEnabled

if setEnabled then
    for _,v in pairs(humanoid:GetPlayingAnimationTracks()) do
        v:Stop(0)
    end
end
wait(math.random(8,12))
if humanoid.health ~= 0 then
    local setEnabled = false
    humanoid:ChangeState(setEnabled and Enum.HumanoidStateType.Physics or Enum.HumanoidStateType.GettingUp)
    character.Animate.Disabled = setEnabled
    notinragdoll = true
end

end) ``

I believe this would work as a ragdoll script.

Gibs = game.Workspace

function OnDeath(Character)
local svch = Character
local hum = Character:findFirstChild(“Humanoid”)
Character.Archivable = true
local chrclone = Character:clone()
Character.Archivable = false

local ch = chrclone:GetChildren()
local i
for i = 1,#ch do
    if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
        ch[i]:remove()
    end
end
local function Scan(ch)
    local e
    for e = 1,#ch do
        Scan(ch[e]:GetChildren())
        if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
            ch[e]:remove()
        end
    end
end
Scan(chrclone:GetChildren())

local hum2 = chrclone:findFirstChild("Humanoid")


if hum2 ~= nil then
    hum2.Name = "Humanoid2"
    hum2.PlatformStand = true
    hum2.Sit = true 
    hum2.MaxHealth = 0
    hum2.Health = 0
end

local ch = Character:GetChildren()
local i
for i = 1,#ch do
    if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
        ch[i]:remove()
    end
end

wait(0.2)

local ch = Character:GetChildren()
local i
for i = 1,#ch do
    if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
        ch[i]:remove()
    end
end
Character = chrclone
Character.Name=""
local Torso = Character.Torso
local movevector = Vector3.new()

if Torso then
    local Head = Character:FindFirstChild("Head")
    if Head then
        local Neck = Instance.new("Weld")
        Neck.Name = "Neck"
        Neck.Part0 = Torso
        Neck.Part1 = Head
        Neck.C0 = CFrame.new(0, 1.5, 0)
        Neck.C1 = CFrame.new()
        Neck.Parent = Torso

        local nsc = script.CamAttach:clone()
        nsc.CamPart.Value = hum2.Parent.Head
        nsc.Disabled = false
        nsc.Parent = svch
    end
    local Limb = Character:FindFirstChild("Right Arm")
    if Limb then

        Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
        local Joint = Instance.new("Glue")
        Joint.Name = "RightShoulder"
        Joint.Part0 = Torso
        Joint.Part1 = Limb
        Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
        Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
        Joint.Parent = Torso

        local B = Instance.new("Part")
        B.TopSurface = 0
        B.BottomSurface = 0
        B.formFactor = "Symmetric"
        B.Size = Vector3.new(1, 1, 1)
        B.Transparency = 1
        B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
        B.Parent = Character
        local W = Instance.new("Weld")
        W.Part0 = Limb
        W.Part1 = B
        W.C0 = CFrame.new(0, -0.5, 0)
        W.Parent = Limb

    end
    local Limb = Character:FindFirstChild("Left Arm")
    if Limb then

        Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
        local Joint = Instance.new("Glue")
        Joint.Name = "LeftShoulder"
        Joint.Part0 = Torso
        Joint.Part1 = Limb
        Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
        Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
        Joint.Parent = Torso

        local B = Instance.new("Part")
        B.TopSurface = 0
        B.BottomSurface = 0
        B.formFactor = "Symmetric"
        B.Size = Vector3.new(1, 1, 1)
        B.Transparency = 1
        B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
        B.Parent = Character
        local W = Instance.new("Weld")
        W.Part0 = Limb
        W.Part1 = B
        W.C0 = CFrame.new(0, -0.5, 0)
        W.Parent = Limb

    end
    local Limb = Character:FindFirstChild("Right Leg")
    if Limb then

        Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
        local Joint = Instance.new("Glue")
        Joint.Name = "RightHip"
        Joint.Part0 = Torso
        Joint.Part1 = Limb
        Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
        Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
        Joint.Parent = Torso

        local B = Instance.new("Part")
        B.TopSurface = 0
        B.BottomSurface = 0
        B.formFactor = "Symmetric"
        B.Size = Vector3.new(1, 1, 1)
        B.Transparency = 1
        B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
        B.Parent = Character
        local W = Instance.new("Weld")
        W.Part0 = Limb
        W.Part1 = B
        W.C0 = CFrame.new(0, -0.5, 0)
        W.Parent = Limb

    end
    local Limb = Character:FindFirstChild("Left Leg")
    if Limb then

        Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
        local Joint = Instance.new("Glue")
        Joint.Name = "LeftHip"
        Joint.Part0 = Torso
        Joint.Part1 = Limb
        Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
        Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
        Joint.Parent = Torso

        local B = Instance.new("Part")
        B.TopSurface = 0
        B.BottomSurface = 0
        B.formFactor = "Symmetric"
        B.Size = Vector3.new(1, 1, 1)
        B.Transparency = 1
        B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
        B.Parent = Character
        local W = Instance.new("Weld")
        W.Part0 = Limb
        W.Part1 = B
        W.C0 = CFrame.new(0, -0.5, 0)
        W.Parent = Limb

    end
    --[
    local Bar = Instance.new("Part")
    Bar.TopSurface = 0
    Bar.BottomSurface = 0
    Bar.formFactor = "Symmetric"
    Bar.Size = Vector3.new(1, 1, 1)
    Bar.Transparency = 1
    Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
    Bar.Parent = Character
    local Weld = Instance.new("Weld")
    Weld.Part0 = Torso
    Weld.Part1 = Bar
    Weld.C0 = CFrame.new(0, 0.5, 0)
    Weld.Parent = Torso
    --]]
end
Character.Parent = Gibs
game.Debris:AddItem(Character, 1000)--despawn in 1000 seconds, you can change this
    --Only if you want a funny death...
    --Character.Torso.RotVelocity=Vector3.new(70,200,70)
    --wait()
    --Character.Torso.Velocity=Vector3.new(0, 250,0)
    --game.Chat:Chat(Character.Head,"Ouch!",2)

end

script.Parent.Humanoid.Died:connect(function()
OnDeath(script.Parent)
end)

2 Likes

No, the one i have works just i’m trying to make it ragdoll on damage.

1 Like

@EchoReaper heres the model. I assumed it would be easier. my ragdoll on hurt - Roblox

2 Likes