Okay, there is one very simple, but oh so important tip for making smooth and seamless osunding key modulations on the fly. Find the common tones the two keys share, and accent them in your lines leading up to the transition.
I don't have a guitar with me right now, but do this: if both the keys in question are major, play the E major and Ab major scales. Make a note of which notes are common to the two keys. There will be some, guaranteed. Now, when you are playing your lines , make those notes the center of attention. When you finally finish the transition and are fully into the seconnd key, then you may seamlessly slip into the rest of Ab major.
Out of the loop? I didn't know there was a loop!