Improvisation

there are no bad notes. All that matters is where you came from, where you go next, and how long you play it. If you play a note that sounds sour, treat it as a passing note and move or down 1 fret. You will never be more than 1 fret away from a note that is in the scale.

substituting the VI for the vi is common. A bVII chord is very common. Using both the IV and the iv chords is common (lots of old Beatles and Beach Boys tunes use that sound).

if you know the key, sticking to scales related to the I or V is likely to get you in key.

If you hear an atypical chord change within the key, and you didn't anticipate the chord beforehand, chances are you will be a half-step above or below what the tonic was before

Say we have a major chord. Our instinct might be to say, "we have 7 notes to choose from". Or, we could think of it more in terms of "featuring" a certain sound. Imagine that the arpeggio (1-3-5) is the basis for our lead, but for this particular lead, we're going to feature the 4, so we tend to lean a little more into its use as we improvise, making our main scale degrees 1-3-4-5. Another time, we decide that we're going to feature the 2, so we lean into the 1-2-3-5 scale degrees.

UE Resources