-------------------


local function SetCollisionGroupRecursive(Object)
	if Object:IsA("BasePart") then
		PhysicsService:SetPartCollisionGroup(Object, CollisionGroupName)
	end

	for _, Objects in pairs(Object:GetChildren()) do
		SetCollisionGroupRecursive(Objects)
	end
end

local function OnCharacterAdded(Character)
	SetCollisionGroupRecursive(Character)
end

local function OnPlayerAdded(Player)
	Player.CharacterAdded:Connect(OnCharacterAdded)
end

local function OnMobAdded(Mob)
	SetCollisionGroupRecursive(Mob)
end
