--add all the parts in the character to charParts, and accessories to accessoryParts

local charChildren = character:GetChildren()
for i = 1, #charChildren do
	if (charChildren[i]:IsA("BasePart") or charChildren[i]:IsA("Part") or charChildren[i]:IsA("WedgePart") or charChildren[i]:IsA("CornerWedgePart") or charChildren[i]:IsA("MeshPart")) and charChildren[i].Name ~= "HumanoidRootPart" then
		table.insert(charParts, charChildren[i])
	end
	if charChildren[i]:IsA("Hat") or charChildren[i]:IsA("Accoutrement") or charChildren[i]:IsA("Accessory") then
		for ii, vv in pairs(charChildren[i]:GetChildren()) do
			if vv:IsA("BasePart") then
				table.insert(accessoryParts, vv)
			end
		end
	end
end
