Toggles the ragdoll state of a given character. When a character is ragdolled, its Motor6D joints are disabled and replaced with BallSocketConstraint instances, allowing for realistic physics-based movement.
Parameters:
character (Model): The character model to apply or remove the ragdoll effect from. This parameter is required.
value (boolean): Determines whether to ragdoll or unragdoll the character.
Set to true to activate ragdoll.
Set to false to deactivate ragdoll.
applyPushOnRagdoll (boolean?, optional): If true, a push impulse will be applied to the character’s HumanoidRootPart when ragdolling. Defaults to false.
pushMagnitude (number?, optional): The strength of the push impulse if applyPushOnRagdoll is true. Defaults to 100.
Returns:nil
Usage
Usage
local RagdollModule = require(game:GetService("ReplicatedStorage").EasyRagdoll)
-- Get the character you want to ragdoll
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
-- Ragdoll the character without a push
RagdollModule.SetRagdoll(character, true)
-- Ragdoll the character with a push of magnitude 200
RagdollModule.SetRagdoll(character, true, true, 200)
-- Unragdoll the character
RagdollModule.SetRagdoll(character, false)
Examples
Example 1
The following code lets you toggle ragdoll with “R” key
--- Services ---
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
--- Modules ---
local RagdollModule = require(ReplicatedStorage:WaitForChild("EasyRagdoll"))
--- Constants ---
local LOCAL_PLAYER = Players.LocalPlayer
local RAGDOLL_KEYBIND = Enum.KeyCode.R
local RAGDOLL_COOLDOWN = 0.5
--- Variables ---
local isRagdolled = false
local canToggleRagdoll = true
--- Functions ---
local function toggleRagdoll()
if not canToggleRagdoll then return end
local character = LOCAL_PLAYER.Character
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
canToggleRagdoll = false
if not isRagdolled then
RagdollModule.SetRagdoll(character, true, true, 200) -- Recommended to add a push so character falls over properly
isRagdolled = true
else
RagdollModule.SetRagdoll(character, false)
isRagdolled = false
end
task.wait(RAGDOLL_COOLDOWN)
canToggleRagdoll = true
end
--- Event Connections ---
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == RAGDOLL_KEYBIND and not gameProcessed then
toggleRagdoll()
end
end)
How to fix ragdoll on death
Ragdoll on death
Roblox breaks the joints of humanoids when they die, which would break ragdolling. You would have to turn that off for any ragdoll to work on death.
Example of doing so.
--- Services ---
local Players = game:GetService("Players")
--- Events ---
Players.PlayerAdded:Connect(function(player: Player)
player.CharacterAdded:Connect(function(character: Model)
local humanoid : Humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.BreakJointsOnDeath = false --- Set This Value To False
end
end)
end)
Updates
2025-07-08T03:30:00ZFixed a bug with limb collisions
2025-07-09T17:56:00ZFixed the floating bug for R15 characters when called on server.
So i can’t see the video so i’m not sure, but is the ragdoll system smooth kind of like the perfect r6 ragdoll? because it looks like it’s deprecated now And also, a death ragdoll does not seem to be working, mind to give an example?
Hey, I don’t think this issue is caused by the module itself, usually that twitching movement is caused by the HumanoidRootPart being stuck in the ground trying to unstuck itself, as you can see in the last second in the video clip, the “twitching movement” stopped
The Floating however is probably caused by the cyan sphere attached to the player Character
Hi and thanks. About the orb, it’s basically just a lerp loop using runservice that is attached to a specified offset
I’ve removed it but still the character ascends. Could it be a collision problem?
To make ragdolls work on death you would have to set the Humanoid.BreakJointsOnDeath value to false.
Heres an example on how to do that. (Serverside Script)
--- Services ---
local Players = game:GetService("Players")
--- Events ---
Players.PlayerAdded:Connect(function(player: Player)
player.CharacterAdded:Connect(function(character: Model)
local humanoid : Humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.BreakJointsOnDeath = false --- Set This Value To False
end
end)
end)
The module doesnt directly create any issues with floating. And like Kitsune said the twitching is mainly caused by the HumanoidRootPart trying to unstuck itself.
If your using any other scripts that affects character movement, it would be a good idea to disable them when the character is ragdolled.
There are no scripts in my baseplate that affect player movement, and nothing interacts with your module directly. And after this post, I did some further testing and noticed the issue only happens in R15, not R6 which is definitely worth noting.
You also previously mentioned:
“There was a bug with version 1 where the limbs would collide with each other, but it should be fixed now.”
So you did update the version? If that’s the case, could you clarify which version it was updated to? I mean, that’s something that should be documented, right?
This wasn’t really helpful, so I’ll probably tamper with it myself. Might edit this post later with whatever fix I come up with
That fix was applied to version 2+
And I did enable autoupdate for the package so any changes I publish should update automatically.
Your able to check the version by checking VersionNumber of the PackageLink inside the module. Sorry for any issues.
Hey, after looking deeper into this issue, I managed to reproduce it on my end. It turns out, it was an issue with how Humanoid:ChangeState was called when the module was server-sided. fixes should be published to the latest version.
however, I also found that whenever I respawn, my limbs would go through the map and after that, I’ll be back to normal.
I eventually found a way and added another task.wait() before asigning the false value for ragdoll.