How to fix this?

how to fix this output error?

Parameter 1 must be BasePart in SetPartCollisionGroup. 
function mob.Spawn(name, quantity, map)
	wait(1)
	local mobExists = serverstorage.Mob:FindFirstChild(name)
	
	if mobExists then
		for i=1, quantity do
			local newmob = mobExists:Clone()
			newmob.Parent = map.Mob
			newmob.HumanoidRootPart.CFrame = workspace.GrassLand.Spawn.CFrame
			
			for i, object in ipairs(newmob:GetDescendants()) do
				if object:IsA("BasePart") then
					PhysicsService:SetPartCollisionGroup(newmob, "Mob")
				end
			end
			
			coroutine.wrap(mob.Move)(newmob, map)	
			
			task.wait(1)
		end
	else
		warn("Requested Mob Is Not Inside The Mob", name) 
	end
end

image

You’re on the right track iterating its descendants, but you’re referencing “newmob” (the model) each time you call SetPartCollisionGroup. Change the the call to PhysicsService:SetPartCollisionGroup(object, "Mob")