GetPartsInPart while ragdolled acting strange

So this only happens sometimes, but whenever a player is ragdolled, and i try to do workspace:GetPartsInPart on their character, it doesn’t actually detect it (returns an empty array). I’ve made sure that the overlapParams include the player’s character and set the filtertype to include.

My hitbox looks like this:
image

I’ve also noticed that when I extend the hitboxes height downwards, the ragdolled character gets detected more often by GetPartsInPart.

The only idea I have of why the ragdolled character isn’t being detected is that the character is somehow X studs below the ground when ragdolled. However, when I tried creating parts at the character’s position, none of them are under the ground.

Does anyone have any idea why GetPartsInPart is not detecting the ragdolled character? Is something wrong with my ragdoll script? Or is this some Roblox thing? If anyone could help me it would be greatly appreciated.

BTW if anyone wants to see my ragdoll (server) script:

--> Allows for proper limb collisions
local function createColliderPart(part: BasePart)
	if not part then return end
	local rp = Instance.new("Part")
	rp.Name = "ColliderPart"
	rp.Size = part.Size/1.7
	rp.Massless = true			
	rp.CFrame = part.CFrame
	rp.Transparency = 1
	
	rp.CollisionGroup = "Ragdoll"
	
	local wc = Instance.new("WeldConstraint")
	wc.Part0 = rp
	wc.Part1 = part
	
	wc.Parent = rp
	rp.Parent = part
end

--> Converts Motor6D's into BallSocketConstraints
function replaceJoints()
	
	--Humanoid.PlatformStand = true
	
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
	
	for _, motor: Motor6D in pairs(Torso:GetChildren()) do
		if motor:IsA("Motor6D") then
			if not attachmentCFrames[motor.Name] then return end
			motor.Enabled = false;
			local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
			a0.CFrame = attachmentCFrames[motor.Name][1]
			a1.CFrame = attachmentCFrames[motor.Name][2]

			a0.Name = "RagdollAttachment"
			a1.Name = "RagdollAttachment"

			createColliderPart(motor.Part1)

			local b = Instance.new("BallSocketConstraint")
			b.Attachment0 = a0
			b.Attachment1 = a1
			b.Name = "RagdollConstraint"
			
			b.Radius = 0.15
			b.LimitsEnabled = true
			b.TwistLimitsEnabled = false
			b.MaxFrictionTorque = 0
			b.Restitution = 0
			b.UpperAngle = 90
			b.TwistLowerAngle = -45
			b.TwistUpperAngle = 45

			if motor.Name == "Neck" then
				b.TwistLimitsEnabled = true
				b.UpperAngle = 45
				b.TwistLowerAngle = -70
				b.TwistUpperAngle = 70
			end
			
			a0.Parent = motor.Part0
			a1.Parent = motor.Part1
			b.Parent = motor.Parent
		end
	end
	
	if script.DontSend.Value  then
	elseif Humanoid.Health <= 0 then
		
		
		
		ClientRagdoll:FireAllClients(Character,true,nil,true)
	else
		ClientRagdoll:FireAllClients(Character,true)
	end
	
	
	Humanoid.AutoRotate = false --> Disabling AutoRotate prevents the Character rotating in first person or Shift-Lock
	Character:SetAttribute("LastRag", tick())
end