How does the molecular motion of a substance change when it goes from liquid to solid?

A.
The molecules gain energy, and their relative motion increases.

B.
The molecules gain energy, and their relative motion decreases.

C.
The molecules lose energy, and their relative motion decreases.

D.
The molecules lose energy, and their relative motion increases.