Heres the script:
local PhysicsService = game:GetService("PhysicsService")
local GroupName = "Enemies"
PhysicsService:CreateCollisionGroup(GroupName)
PhysicsService:CollisionGroupSetCollidable(GroupName, GroupName, false)
while true do
wait()
local function ChangeGroup(Part)
if Part:IsA("BasePart") or Part:IsA("Part") or Part:IsA("MeshPart") then
PhysicsService:SetPartCollisionGroup(Part, "Enemies")
end
end
for i, Object in pairs(workspace.Enemies:GetChildren()) do
ChangeGroup(Object)
end
end
There's a folder called Enemies in the workspace with humanoid enemies (basically zombies).

3 comments
Make sure that the parts in CollisionGroups have CanCollide on. That is a mistake I had made before.
Also on line 5 you the CollisionGroupSetCollidable the first two arguments have the same string/group. Those two need to be different.
btw ur not an idiot lots of programmers make bugs like me i make some bad scripting bugs too lol