Adding a stud wall? I need to build a wall that runs between and parallel...

I need to build a wall that runs between and parallel to the rafters, how do I stabilize it at the top? Thanks extremely much!
Answers:    make sure the wall is level first and consequently afterwards at the top of the wall add some kind of pin blocking and then you will have a wall on the straight and come to a point hopefully!!
put blocking between the rafters where you want to pin the top plate probably every 16 inches