In case of metals, with increase of temperature , the kernels start vibrating and thus offer resistance to the flow of electrons. Hence, conductivity decreases. In case of semiconductors, with increase of temperature , more electrons can shift from valence band to conduction band. Hence, conductivity increases.