Ragdoll bugging hard

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    a working ragdoll system

  2. What is the issue?

    the player parts are set to a different collision group yet they still seem to not collide with the other collision group in the case being Default

  3. What solutions have you tried so far?

    I have tested different humanoidstates, collosion groups

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local PlayerController = require(game:GetService("ReplicatedStorage"):WaitForChild("Modules").CharacterModules.PlayerController)
local PS = game:GetService("PhysicsService")
local tempG = PS:RegisterCollisionGroup("TempGroup")

local Handler = {}

function Handler.Ragdoll(Enemychar,enemyHum)

	local IsRagdoll = Enemychar:GetAttribute("Ragdoll")

	if IsRagdoll then return end

	Enemychar:SetAttribute("Ragdoll", true)
	
	PlayerController.State(enemyHum,5)
	
	enemyHum.AutoRotate = false
	enemyHum.PlatformStand = true
	enemyHum:ChangeState(Enum.HumanoidStateType.Physics)
	enemyHum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
	enemyHum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
	enemyHum:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	enemyHum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)

	for i, joint in Enemychar:GetDescendants() do

		if joint:IsA('Motor6D') then

			local socket = Instance.new('BallSocketConstraint')
			socket.Parent = joint.Parent

			local attachment0 = Instance.new('Attachment')
			attachment0.Parent = joint.Part0

			local attachment1 = Instance.new('Attachment')
			attachment1.Parent = joint.Part1

			attachment0.CFrame = joint.C0
			attachment1.CFrame = joint.C1

			socket.Attachment0 = attachment0
			socket.Attachment1 = attachment1
			socket.TwistLimitsEnabled = true
			socket.LimitsEnabled = true

			joint.Enabled = false
			
		end
		
		if joint:IsA("BasePart") or joint:IsA("MeshPart") then
			joint.CollisionGroup = "TempGroup"
		end
	end
	
	PS:CollisionGroupSetCollidable("TempGroup","Default",true)
	
	task.delay(5,function()

		Enemychar:SetAttribute("Ragdoll", false)

		for i, joint in pairs(Enemychar:GetDescendants()) do

			if joint:IsA('Motor6D') then

				joint.Enabled = true

			elseif joint:IsA('BallSocketConstraint') then

				joint.Enabled = false
				
			end
			
			if joint:IsA("BasePart") or joint:IsA("MeshPart") then
				joint.CollisionGroup = "Default"
			end
		end
		
		enemyHum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, true)
		enemyHum:ChangeState(Enum.HumanoidStateType.Running)
		enemyHum.PlatformStand = false
		enemyHum.AutoRotate = true

	end)
end

return Handler

You need to create custom collision parts welded to the limbs.

What the guy above me said

Weld invisible colliders to the player and enable collision on them when a character gets ragdolled ^^

Ye I’ll try that be collision groups should work tho that’s why I’m saying it’s bugging cause like this im creating extra parts man, it’s gonna take an impact on my game, for lower end pcs

No.

Also no, it won’t impact your performance significantly.

First of all my guy if you gonna say no please explain why cause I got a few people I know who a scripters of pretty popular games and they all say that setting the players body parts in a seperate collision group should work however in my game it doesn’t seem it wants to

As somebody who has created multiple games with ragdoll mechanics, what I’m telling you is the truth.

Humanoids mess with collisions, so simply changing the collision group will not fix the issue.

ok well i did what u said i created each part and assigned it to each limb yet for some reason there is some weird buggy stuff going on. as u can see it looks like a collision problem to me

Make the colliding parts visible to try and test why they are doing this

Huh they are visible? and how do you mean test i cant test if i don’t know why all limb collisions are off bro

When enabling ragdoll you also should anchor humanoid root part and not create any joints with it.

As a side note, don’t get aggressive with the people trying to help you. It’s free work, but that work goes away if you’re not willing to easily receive it.

I may come across aggressive but I asure you I am chill, that’s just the way I talk, and if I anchor HRP how is it gonna fall to the floor?

The root part shouldn’t be falling to the floor.

Yes but everything is connected to that so if I anchor the HRP the body won’t fall to the floor

Disconnect the HRP and see what happens.