Player floats up when ragdolling when still alive

I’d like to fix my ragdolling script, which is intended to be able to use even if the player is not dead. Currently, when ragdolled and alive, the player starts floating up.

Here’s my code:

local Char = script.Parent
local Hum = Char:WaitForChild("Humanoid")
local Root = Char:WaitForChild("HumanoidRootPart")

local function Ragdoll()
	for i, v in pairs(Char:GetDescendants()) do
		if v:IsA("Motor6D") then
			local a0, a1 ="Attachment"),"Attachment")
			a0.CFrame = v.C0
			a1.CFrame = v.C1
			a0.Parent = v.Part0
			a1.Parent = v.Part1
			local b ="BallSocketConstraint")
			b.Attachment0 = a0
			b.Attachment1 = a1
			b.Parent = v.Parent
	Root.CanCollide = false



If anyone knows what else I need to add or remove, please let me know. Thanks!


Do you happen to have any one of the Legacy Body Movers inside your character’s Torso or HumanoidRootPart before ragdolling? Your script seems fine, so it might be an external force acting on the character.

Have you tried enabling PlatformStand on the Humanoid before ragdolling?

There’s no bodymovers put into my character, and I haven’t - I’ll try that right now.

Alright, so I tried changing the humanoid’s state to platformstanding before it ragdolls, and it still floats.

1 Like

I know this isn’t a solution to why this is happening, but if you Anchor the HumanoidRootPart prior to ragdolling, does it stop floating?

Why don’t you try anchoring the HumanoidRootPart? Not the best way, but it’s the best method I can think of for now.

Well, I did, but it seems to still want to float. And I’m trying to make a bit of a ragdoll engine.

Can I get a video with the HumanoidRootPart anchored? Also, do you have any other scripts in your game that could possibly interfere? Also, currently, the ragdoll script is the only script in the game.

Also, the ragdoll works fine on death.

Hmm… Maybe you should try not replacing ALL the Motor6d’s. Normally you wouldn’t want to mess with the one connecting the HumanoidRootPart to the Torso, for instance. Try creating an if statement that checks to make sure that it only replaces the joints that you need to be loose, and see if that helps.

Also make sure that the character’s HumanoidRootPart is not colliding with the other body parts, and causing weird physics.

1 Like

This is from the rootpart colliding with the rest of the body, I don’t know too much of the specifics but if you use some on all the parts to the humanoidrootpart, you may be able to get rid of this effect. Simply making the root non cancollide doesn’t fix it due to how humanoids are setup.

Try changing Humanoid State to Ragdoll and disable GettingUp State in client-side.


17 days later… Is it solved yet?

1 Like

I tried out your code here, it helped alleviate the weird floating thing I got from trying to use code from this post:, but whenever you walk close to the corpse, the corpse stands up. Not sure what is the root cause of this, also code bellow:

--in server script detecting death
for _, v in pairs(character:GetDescendants()) do
				if v:IsA("Motor6D") then
					local Att0, Att1 ="Attachment"),"Attachment")
					Att0.CFrame = v.C0
					Att1.CFrame = v.C1
					Att0.Parent = v.Part0
					Att1.Parent = v.Part1
					local BSC ="BallSocketConstraint")
					BSC.Attachment0 = Att0
					BSC.Attachment1 = Att1
					BSC.Parent = v.Part0

			character.HumanoidRootPart.CanCollide = false
			local BodyClone ="Model", game.Workspace)
			--local CloneHumanoid ="Humanoid", BodyClone)
			for _, v in pairs (character:GetChildren()) do
				if v:IsA("Humanoid") then continue end
				--if v:IsA("ShirtGraphic") then TShirtId = v.Graphic end
--not rly needed as I could do it within the for loop but it helped
--alleviate ragdoll issues such as them spasing out due to collision.
--I should also destroy every local script within.

					--if TShirtId~="" then
						--BodyClone["Shirt Graphic"].Graphic=TShirtId

Ive had the same issue and I came up with the solution of firing a remote event once a player ragdolls on the client side.

Once a player ragdolls if its server sided that its, then just fire a client event that’ll have both

Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)

and to unragdoll, you can just do

Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, true)

yea firing a remote didn’t change anything from my error

Okay so for anyone reading, I found a different way, what I did was use this: EDIT: IT STILL FREAKING GLITCHES IM JUST GOING TO USE THE BASIC CODE WITHOUT A PERSISTENT MODEL…

I followed instructions except I put the module under the death checker in server script service.

and then I just do:


and then I wait till the character loads (look at my above code in above post) and then wait 1 second (this is to allow any natural physics to occur i.e. falling from an area, could make it longer) and then anchor all the body parts of the ragdoll (without doing this, the body will start twitching)

for i, v in pairs(BodyClone:GetChildren()) do
					if v:IsA("MeshPart") then

note after some point you’ll need to fetch all the names of the corpses and destroy them or use the despawn feature depending on your needs.

Since you walk close to it and you move all characters parts into another model, this is probably because of Network Ownership. Try setting all Part network owner to server on server-side using:


If that doesn’t solve, can you record from another player’s perspective?

Anything else? I’ve had this on my script for a while and it doesn’t fix the issue

I know this is an old topic but I haven’t found a solution yet in other topics