I can't really tell anyone how to play a solo or write a lead line or melody. What I can do is give you some general rules about how melodies are constructed. These guidelines are just that "guidelines", they are not set in stone. They do have some merit in many musical situations but in others they should be disregarded.
1) Melodies will generally progress by step from one note to the next in a given scale with skips or leaps being used for variety. Movement by step in the opposite direction should follow leaps of an interval greater than a third. This means that most of the time you are playing a melody, your melody line will move from note to note without skipping notes of the scale. But when you do skip a few notes in the scale you will change the direction of the melody and play by step towards the direction you started from.
2) The melody should change direction every four to five notes. The melody should flow in both up and down in pitch. Changing the direction of the melody line often will help the melody flow. (There are many exceptions to this rule.)
3) Most melodies have a climax point. This could be a note higher than the rest of the melody or a note in some other way accented.
4) If the melody is complex the harmony should be simple, if the harmony is complex the melody should be simple. When the harmony and the melody become complex at the same time the result usually sounds muddy.
5) Avoid the use of Augmented 4th and Diminished 5th intervals or any other interval the results in a tri-tone.
6) Chromatic movements should be used sparingly. Moderate use of passing tones is usually expectable. (Depending on what type of music you are playing there could be many exceptions to this rule.)
7) Avoid over repetitiveness. Repeating the same melody line over and over can become boring for the listener. This rule can be avoided by changing the melody itself or, by changing the dynamics of the melody while keeping the notes of the melody the same. Another way to avoid over repetitiveness is by changing the meter, octave, or diatonic scale degree of the melody line. The melody lines can sound similar just not the exactly the same.