Slap Battles Ragdoll System | R6

Model in Marketplace: Slap Battles Ragdoll

Showcasing:

How does this work? In a Model that has a Humanoid, a attribute is created, with which, when the state changes, this character enters and exits ragdoll

Setup:

  1. Download this asset. And put it in ServerStorage
    Ragdoll Module.luau
  2. Create a Script in ServerScriptService and paste the following code into it to activate the ragdoll
local Players = game:GetService('Players')
local ServerStorage = game:GetService('ServerStorage')
local ragdollModule = require(ServerStorage.RagdollModule)

local function main(v:Humanoid?)
	if not v:IsA('Humanoid') or not v.Parent then return end
	local character = v.Parent
	local player = Players:GetPlayerFromCharacter(character)
	if not script:GetAttribute('NPCs') and not player then return end
	character:SetAttribute('Ragdoll',false)
	local function onGetAttributeChangedSignal()
		if character:GetAttribute('Ragdoll') then
			ragdollModule.ragdoll(character)
		else
			ragdollModule.unRagdoll(character)
		end
	end
	character:GetAttributeChangedSignal('Ragdoll'):Connect(onGetAttributeChangedSignal)
	v.BreakJointsOnDeath = false
	local function onDied()
		ragdoll.Value = true
	end
	v.Died:Once(onDied)
end

workspace.DescendantAdded:Connect(main)

for _,v in workspace:GetDescendants() do
	main(v)
end
  1. Create a attribute in this script and name it “NPCs”. If you set this to true, non-player rigs will also have ragdoll

  2. Create a UnreliableRemoteEvent in ReplicatedStorage and name it “StateEvent”

  3. Create a LocalScript in StarterCharacterScripts and paste the following code into it to prevent certain player ragdoll glitches

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local stateEvent = ReplicatedStorage.StateEvent
local character = script.Parent
local humanoid:Humanoid = character:WaitForChild('Humanoid')

local function onClientEvent(status)
	if not humanoid.Parent then return end
	humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,status)
	humanoid:ChangeState(status and Enum.HumanoidStateType.GettingUp or Enum.HumanoidStateType.Physics)
end

stateEvent.OnClientEvent:Connect(onClientEvent)

Thanks for using this! :slightly_smiling_face:

22 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?

1 Like

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.

1 Like

finally a ragdoll system that isnt from 2020 bc
and its working
thank you

2 Likes

11.09.2025 Update:

  • Fixed a bug where the player would not respawn after death when pressing the RESET button/fall into the void. The reason was the disabled RequiresNeck property of the Humanoid
  • Added an option to enable/disable ragdoll for NPCs
  • Code optimizations
1 Like

Strangely at random this script will just delete the player and say “Gameplay Paused”. Is there a reason for this, and if not, is there at least a fix?

1 Like

I tested it several times and didn’t encounter this problem. It’s possible you’re using your ragdoll on a custom character and it’s not working correctly. With the default character in R6, none of the above happens.

1 Like

08.17.2026 Update:

  • Fixed a glitch causing the character to “spontaneously levitate” when enters ragdoll
  • Minor code optimizations

Hey, sorry to revive so randomly, but I am working on my own ragdoll for my game and was wondering how you fixed the “levitation” issue. It mostly occurs with my NPCs and I’m not sure what exactly is causing it but it appears to be the NPCs being set in the running Humanoid-State despite being swapped to different ones in many places. Is this what happened with you or is there something that occurred that you fixed?

Yeah, I’ve run into this problem many times too. Make sure that the PlatformStand of Humanoid is set to true. HumanoidStateType is Physics and others states are disabled. Also you can try changing humanoid WalkSpeed, JumpPower/JumpHeight on 0 (personally, I was able to fix the “levitation” issue this way)