Writing instrumental parts is a bitch but so rewarding when it goes well. A lot of the time I'll write a bunch of variations to a part in MIDI and then pick out what I like out of those parts. Think of it this way; if you're a photographer, maybe 1/10 photos you take is really good. Well if you're a musician, then 1/10 parts you write are really good.
Usually I start out with a chord progression or rhythm part, then I write the other parts off of that. If you're a drummer then you know that in a 4/4 time signature you'll have a strong beat on the 1st and 3rd beat of the bar - well instrumental parts work like that too. You want to line up the most important parts of an instrumental part so that they hit with the drums, for example you should put a chord change on the 1st and 3rd beats as opposed to the second and 4th beats, because it musically makes more sense and is more pleasing to the ears. And blues scales. Blues scales are almost always good.
Hope that helps!