I've been playing for about 3 maybe 4 years now, took lessons about 3/4 of that. I have learned a lot of songs and have a huge repertoire of things i can play. I'm a metal player mostly.

But i have a problem. i cant improvise solos at all, just rhythm parts

I was over my friends house, we're both 15 and he's been playing since like age 7 or 8. He can just pick up a guitar and play a fast solo that sounds good. He said he just comes up with it right there. whenever i try to come up with my own solos it either

doesnt sound good
is bland
repeating the same things over and over

i'm stuck, i don't know what to do. i don't want to be a rhythm player for the rest of my life

What helped me when I started was to create some '' go to'' licks in the key of your choice. Then, between them try to connect them with short melodies or some vibrato. At first it will sound like shit, but just keep try to add new random stuff and experimenting with different note combinations. Be sure to know at least one full scale to begin with. Whatever you do though try to avoid just going up and down the scale one note at a time. Try to sequence the notes and use unique intervals.

Stop, listen and think more. You can't create pleasing sounds if you don't know what those are and you can't know what those are if you don't listen to the backing and listen to what you're doing. You need to play notes with purpose, not just let your fingers run over what you know.

__________________
R.I.P. My Signature. Lost to us in the great Signature Massacre of 2014.

Are you still taking lessons? Maybe ask the teacher. But you just need ear training and you need to improvise more. The easiest way to learn to improvise is to improvise. But try to hear some melodies in your head. If you are just running the scales up and down/playing all the common licks, it's going to sound very generic. You need to have some kind of idea in the solo. And you need to know what you are doing.

Had that problem, sometimes still have but, my playing has gotten better since I studied phrasing. Right now I jam to whatever really. My improvement was quick, I'm not saying it's perfect, I still have to work on it. Choose three players, your absolute favorites(In my case Satriani, Rhoads, Timmons & the honorable fourth is Hendrix). Listen to them, to how they manipulate the guitar, and figure out their songs by ear. That last one is extremely important.

Another tip might be just relax. On summer I was at a Berklee Jazz Camp, and I obviously didn't play Jazz. So, once I'm improvising and the guitar teacher tells me that I'll have to on class. Stupidly nervous, the first lick was purely lifted of Zakk Wylde's repertory. He told me: you know I want to hear you play out of your comfort, relax and play easy, be on the back a while and don't be on command. It obviously resulted in a great improv and my fellow students dug it, which made it better.
Phrasing, relaxation, experiment, restrictions, etc. These mig

i'm stuck, i don't know what to do. i don't want to be a rhythm player for the rest of my life

He's been doing it for eight years and you've been doing it for three or four, and you're surprised that he's a lot better than you?

So there are two major components to soloing:

1) Physical: Can you move your fingers around quickly and accurately, while creating good tone?

2) Mental: Do you have anything to say? Can you think in music?

You work on the physical stuff by practicing scales. Use a metronome. Make sure you're getting good tone. Also, you can study "licks" - individual phrases that are committed into muscle memory. Don't worry about playing stuff "fast" yet - speed comes with time. Worry about good tone and precision, and speed will come.

You work on the mental stuff by developing your ear and studying solos you love. So download and use the functional ear trainer from miles.be, but also as your ear develops spend some time each week trying to transcribe melodies by ear. This will all be hard at first, but keep at it. As you get better at transcribing, make a point of trying to figure out licks and solos you love - by ear as much as possible.

If you do all this, you will gradually see some significant improvement in your ability to improvise. It's a long road, though: being a good improviser is very hard, and the mental side of this sort of work is slow. It's like learning to speak a new language - you don't expect to get fluent in a new language in a year or even two.

Have some blues licks under your fingers. Learn about melodic control, for examle play a I-VII progression, then solo over it. First play only chord tones, then connect them with other notes. Throw some blues licks in, some ascending descending runs ending on chord tones, doesnt need to be fast. Then even when soloing without a rhytm, imagine a chord progression behind. Thats how i do it.

Well, there is something I can advice you and that helped me improve my improvising skills: sing and work with your ear. There's this software called Earmaster which basically aims to 'train' your ears and get you used to recognize chords, harmonies, scales, intervals and so on.
Listen to guitarists such as Satriani, Steve Vai, Andy James and Paul Wardingham. Their melodies aren't that crazy, but they sound beautiful and give some direction to a solo. Soloing is not just about going up and down really fast through the scale! It's more about knowing your melody, and developping it. You can easily make a simple melody sound more complex by adding ornaments and technique.

Do you know a bit about music theory? Because it helps a lot. Learn about scales and modes, try to get used to the way they sound, learn the intervals. You can also learn a bit about the fugue techniques and listen to Bach even though you are into metal and not into classical. Also, listen to Mozart variations on 'Ah vous dirais-je maman' which may give you ideas to work out your melodies!
Also, try not to only play 16th or 8th. That's boring! Instead, try other rythms. Rythm can give something different to soli and melodies. ^^