Roblox ragdoll acting weird

  1. What do you want to achieve? Ragdoll physics that doesn’t have a seizure after ragolling

  2. What is the issue?

  3. What solutions have you tried so far? I didn’t find the correct solution

function RagdollPlayer(Character : Model)
	Character:FindFirstChildWhichIsA("Humanoid").BreakJointsOnDeath = false
	Character:FindFirstChildWhichIsA("Humanoid").RequiresNeck = false
	Character:FindFirstChildWhichIsA('Humanoid').PlatformStand = true
	Character:FindFirstChildWhichIsA('Humanoid').AutoRotate = false
	Character:FindFirstChildWhichIsA('Humanoid').WalkSpeed = 0
	
	for _, v in pairs(Character:GetDescendants()) do
		if v:IsA("Motor6D") then
			local Att0, Att1 = Instance.new("Attachment"), Instance.new("Attachment")
			Att0.CFrame = v.C0
			Att1.CFrame = v.C1
			Att0.Parent = v.Part0
			Att1.Parent = v.Part1
			local BSC = Instance.new("BallSocketConstraint")
			BSC.Attachment0 = Att0
			BSC.Attachment1 = Att1
			BSC.Parent = v.Part0
			BSC.LimitsEnabled = true
			BSC.TwistLimitsEnabled = true
			
			v:Destroy()
		elseif v:IsA('BasePart') then 
			v.CanCollide = true
		end
	end
	Character.HumanoidRootPart.CanCollide = false
	--Character.Head.CanCollide = true
end
5 Likes

You need to set the humanoid state to physics, and that BreakJointsOnDeath on the humanoid is turned to false.

2 Likes

i’ve did and it didn’t help, also it flies up after i ragdoll

1 Like

Try making it so the character is handled by the server: “character.HumanoidRootPart:SetNetworkOwner(nil)”

1 Like

still. the issue remains the same

1 Like

There is another forum similar to your issue, try doing it from here:

Try setting CanCollide on the arms and legs to true after death.

You can also try playing around with BallSocketConstraint.MaxFrictionTorque

1 Like

You can try use rope constraint’s instead of ball socket contraints it would look like this:

	if v:IsA("Motor6D") and v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" and v.Name ~= "Head" then
			game.Workspace.CurrentCamera.HeadLocked = false
			game.Players.LocalPlayer.Character.Humanoid.BreakJointsOnDeath = false
			local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
			a0.CFrame = v.C0
			a1.CFrame = v.C1
			a0.Parent = v.Part0
			a1.Parent = v.Part1

			local r = Instance.new("RopeConstraint")  -- Change to RopeConstraint
			r.Attachment0 = a0
			r.Attachment1 = a1


			r.Length = 0.1
			r.Parent = v.Part0

			v.Enabled = false

		end

i changed the max friction torque to 50 and it doesn’t rotate the arms and legs anymore but the arms and legs go through floor like they don’t have collision even though the can collide is set to true

1 Like

Are you sure they have CanCollide true? Try playtesting and checking the properties.
You might have to put a loop or a RunService.HeartBeat event that changes the collision property

2 Likes

it’s set to false when i playtest it but i’m setting it to true in the script

1 Like

Try changing part.CanCollide = true to

local connection
connection = RunService.Heartbeat:Connect(function()
  if not part.Parent then
   connection:Disconnect()
  end
 part.CanCollide = true
end)
1 Like

Make sure that the state of the humanoid is Physics when it’s ragdolled

1 Like

Wait are you doing the ragdoll through the server?

1 Like

Yes that should work you need to set it in a localscript though

1 Like

yes, all of my code is server (the additional code that people suggested me to add is also on the server)

but other people wouldn’t see the ragdoll

So you want to set the humanoid state to physics on the local side and do the ragdoll on the server side and that should work!

Now it works but the camera still got the wobble after the ragdoll, how do i disable it??

game.Workspace.CurrentCamera.HeadLocked = false