you can make more off an investment than you are paying in loan interest then invest it. If you are looking to build credit, you can do that with other credit lines. Which one will cost you the least and bring you the best return?
Generally student loans have low interest and long payback schedules so they would be good money to use on investments.