Slap Battles Ragdoll System | R6

Model in Toolbox: Slap Battles Ragdoll

Showcasing:

HOW DOES THIS WORK: in a Model that has a Humanoid, a BoolValue is created, with which, when the state changes, this character enters and exits ragdoll.

Setup:

Using Code

  1. Download this asset. And put it in ServerStorage!
    SB Ragdoll System R6.rbxm (2,7 КБ)

  2. Create a script in ServerScriptService and paste the following code into it to activate the ragdoll!

task.wait()

local RagdollSystem = require(game.ServerStorage["SB Ragdoll System | R6"].ModuleScript)

for _, Kid1: Model? in pairs(game.Workspace:GetDescendants()) do
	if not Kid1:FindFirstChildWhichIsA("Humanoid") then continue end
	RagdollSystem.Set(Kid1)
	if Kid1:FindFirstChild("Ragdoll") then
		local ExistingRagdollValue: BoolValue = Kid1.Ragdoll
		ExistingRagdollValue.Changed:Connect(function(Value)
			if Value then
				RagdollSystem.Ragdoll(Kid1)
			else
				RagdollSystem.UnRagdoll(Kid1)
			end
		end)
		continue
	end
	Kid1.ChildAdded:Connect(function(Kid2)
		if not Kid2:IsA("BoolValue") and Kid2.Name ~= "Ragdoll" then return end
		Kid2.Changed:Connect(function(Value)
			if Value then
				RagdollSystem.Ragdoll(Kid1)
			else
				RagdollSystem.UnRagdoll(Kid1)
			end
		end)
	end)
end

game.Workspace.DescendantAdded:Connect(function(Kid1: Model?)
	if not Kid1:FindFirstChildWhichIsA("Humanoid") then return end
	RagdollSystem.Set(Kid1)
	if Kid1:FindFirstChild("Ragdoll") then
		local ExistingRagdollValue: BoolValue = Kid1.Ragdoll
		ExistingRagdollValue.Changed:Connect(function(Value)
			if Value then
				RagdollSystem.Ragdoll(Kid1)
			else
				RagdollSystem.UnRagdoll(Kid1)
			end
		end)
		return
	end
	Kid1.ChildAdded:Connect(function(Kid2)
		if not Kid2:IsA("BoolValue") and Kid2.Name ~= "Ragdoll" then return end
		Kid2.Changed:Connect(function(Value)
			if Value then
				RagdollSystem.Ragdoll(Kid1)
			else
				RagdollSystem.UnRagdoll(Kid1)
			end
		end)
	end)
end)

Manually

  • Player
    Place a BoolValue in StarterCharacterScripts and name it “Ragdoll”

  • NPC
    Place a BoolValue in Model with Humanoid and name it “Ragdoll”

Регдолл в Rig

Thanks for using this! :slightly_smiling_face:

6 Likes

Thank you so much man, but how can i make so that it detects the speed and the jump power when you get ragdolled, then put it back when you get unragdolled?

These are properties of Humanoid such as WalkSpeed, JumpPower or JumpHeight if I understood your question correctly. In the main ModuleScript you can see when ragdoll and unragdoll happens.