My textbook states the following: When an electron strikes the metal, it will be attracted towards the nucleus of an atom in the metal. This will cause it to change both its speed and direction - in other words, it decelerates.
But I fail to see why the electron decelerates. They electron is attracted to the nucleus. So it must accelerate towards the nucleus right? And once it collides with the nucleus, it must lose its energy and stick to the nucleus. What am I missing?