CollisionGroup on OverlapParams does not work

The part is a descendant of the right instance, and has the NPCRoot CollisionGroup, but when I print parts, it returns an empty table. When I remove the CollisionGroup from OverlapParams, it works, but then I’m stuck getting a ton of useless parts that I don’t need. The Hub says CollisionGroup is a valid property.

local NPCOverlapParams = OverlapParams.new()
NPCOverlapParams.FilterDescendantsInstances = { workspace.Core.NPCs }
NPCOverlapParams.CollisionGroup = "NPCRoot"
NPCOverlapParams.FilterType = Enum.RaycastFilterType.Include

while true do
    local Success, Parts = pcall(function()
	    return workspace:GetPartBoundsInRadius(Player.Character:GetPivot().Position, 50, NPCOverlapParams)
    end)

    print(Parts) -- {}

    task.wait(0.5)
end
1 Like

This might help:

CollisionGroup

Specifies a collision group for the operation. Parts in collision groups that are set to not collide with this group are ignored.

OverlapParams | Documentation - Roblox Creator Hub

image
I set it to CanCollide and still didn’t work

Have you tried not setting .FilterDescendantsInstances?

I’m having this same issue right now. I have OverlapParams with a collision group, filterType set to “Include”. My sensor part is not collidable and is in the same group as Overlap Params group.

The overlap params group is collidable with my target group.
Yet still no parts can be detected. RespectCanCollide tried both true/false.

EDIT:
I got it working for my needs by reversing the concept.
FilterType set to Exclude
RespectCanCollide left on default setting
Set my Overlap Param group to NOT collide with “Default” group
Added an exclusion or two to the param filter list
Now my Overlap Param group will pick up anything not part of the Default Group.