Needing help with ragdoll script for fall damage

I want to have a ragdoll script similar to emergency response/maple county as to where the arms and legs spread out and isn’t like a mannequin, I have tried some troubleshooting but I’m not really familiar with the code used.

task.wait(1)

local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
local RagdollTime = 5
local MinVelocity = -100

humanoid.StateChanged:Connect(function()
	if humanoid.RootPart.Velocity.Y < MinVelocity and humanoid.FloorMaterial ~= Enum.Material.Air then
		local velocity = math.floor(-humanoid.RootPart.Velocity.Y * .25)

		script:FindFirstChildOfClass("RemoteEvent"):FireServer(velocity)

		humanoid.BreakJointsOnDeath = false
		humanoid.RequiresNeck = false
		humanoid:ChangeState(Enum.HumanoidStateType.Physics)

		for _, v in pairs(character:GetDescendants()) do
			if v:IsA("Motor6D") then
				local weld = Instance.new("Weld")
				weld.C0 = v.C0
				weld.C1 = v.C1
				weld.Part0 = v.Part0
				weld.Part1 = v.Part1
				weld.Parent = v.Part0
				v.Enabled = false
			end
		end

		task.wait(RagdollTime)

		for _, v in pairs(character:GetDescendants()) do
			if v:IsA("Motor6D") then
				v.Enabled = true
			end
			if v.Name == "Weld" then
				v:Destroy()
			end
		end

		humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)

		humanoid.Died:Connect(function()
			script:Destroy()
		end)
	end
end)

Combine my ragdoll module: https://youtu.be/gKvNDVXhS2I?si=t1vfTdm1YgJ8pwNe with a fall damage script from the toolbox :+1:t3:

1 Like

Okay, thank you! I already have a fall damage script but thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.