Also, remember to use non-chord tones (neighboring tones, passing tones, etc...) and chromatic runs. This is what takes your improvising to the next level. Especially taking ideas/patterns and running them down (or up) the neck chromatically. That gets 'em every time!
Improvising is ALL about playing what you hear inside of your head, even if all of the notes aren't in the scale. But that obviously doesn't mean start playing in a different key!
Learning all of the modes of all of your scales is a BIG help. The dorian is a common mode for jazz. I've found that it works really well in funk as well, along with the mixolydian mode. You can also create some really interesting licks by combining those two modes as you solo along in a funk song. Scales are great tools to have for playing anyway, regardless of whether you're improvising or not.
This is all theory talk though. The trick to improvising is to play what you hear. Singing the same thing that you're playing when improvising is a GREAT way to build up ideas. The more you improvise, the easier it gets. It's also partly building up the confidence to play something no one's ever heard before (in a sense).
Start out slow. Don't try to rush into playing like the greats. Just take it step by step and you'll get it. Once you do, you'll be able to play whatever you want, whenever you want and you will thank yourself for learning how.
I hope some of this helps. These are some of the things I've come to realize over the few years I've been improvising. More than anything though, everyone does it differently. Once you find a way that works for you, you've got it.