The statement is wrong because the student concluded that it is only in during phase transitions that molecules in substances gain or lose energy. It is not only on phase transition processes that energy is changed but also in other process especially chemical process where new bonds are formed while bonds are broken down.