A charge of an opposite kind is induced in the neutral pith ball when a positively charged glass rod is brought near it. So, the pith ball becomes negatively charged, and we know that opposite charges attract each other, so the pith ball gets attracted towards the glass rod.