Attic knee wall custom ripped top plate - Will it work?
It might be easier to nail a 2x4 to the roof joists and then cut the tops of the vertical studs to fit the angle of the top plate. You could then easily nail the studs to the top plate.