In the warm room, the molecules of the gas contained in the ball have more K.E and more collisions with the walls of the ball. Therefore, the volume is large. When it is taken to the colder environment outside, it exchanges heat with it and becomes colder. As a result, the K.E of the molecules decreases, decreasing the pressure on the walls. Thus, the volume of the ball decreases.