Creating solos out of nowhere can be for the beginner a challenge. Often people wonder what kind of notes fit over a given chordsequence.
Scales may work well to get the material for your given notes, an easier way may be to work with chordtones since you already play the chords. Rootnotes of the given chordsequence will give you a sense of the order of the harmony. You may dress up the rootnotes with other notes which are close to the rootnote. Get used to playing musical phrases for your solos which contain the rootnotes, this approach will make you aware which chord is being played at which time in the sequence.
Being aware of where you are in the sequence is a must at all times, often people overlook this skill. Not knowing where you are in the sequence (read song) is like playing solos on the guitar without hearing the chords you play over. Is this possible? Yes, but you are likely to stumble over yourself, similar as walking on a staircase in the dark in an unknown building, you may make it to the top but you may also tumble down with all the given consequences.
Next to playing rootnotes you may like to have some targetnotes: Notes which may be outside the chordtones but they may lead you to a certain melody which works. Experiment with some chordtones and notes outside the chords to see which tones you like to use as targetnotes. You may even use tones which lead into certain chords, again, these notes may be “outside” the key of the song, but they may work and stand out as such.
Learning to play solos is a skill which needs to be developed. In the beginning you may find you just play notes, and yes, the notes you play may make sense but you will still need to learn how to make musical phrases which sound good over the given chordsequence. It is perfectly normal that it does take some time, just stick with it and enjoy what kind of sounds you are making and keep playing and experimenting.
Enjoy,
Eddie