local function C(C)local s=PhysicsService:GetRegisteredCollisionGroups()for s,p in ipairs(s)do if p.name==C then return true end end return false end if not C(npcGroup)then PhysicsService:RegisterCollisionGroup(npcGroup)end if not C(playerGroup)then PhysicsService:RegisterCollisionGroup(playerGroup)end PhysicsService:CollisionGroupSetCollidable(npcGroup,playerGroup,false)
-- Create the collision groups and set them to not collide with each other
local function collisionGroupExists(groupName)
	local groups = PhysicsService:GetRegisteredCollisionGroups()
	for _, group in ipairs(groups) do
		if group.name == groupName then
			return true
		end
	end
	return false
end
if not collisionGroupExists(npcGroup) then
	PhysicsService:RegisterCollisionGroup(npcGroup)
end
if not collisionGroupExists(playerGroup) then
	PhysicsService:RegisterCollisionGroup(playerGroup)
end
PhysicsService:CollisionGroupSetCollidable(npcGroup, playerGroup, false)
