To discourage is to make someone feel less excited about something.
Mr. Perry discouraged the students from quitting school.
Example picture