If you don't mind I'd like to talk about my own experiences with making friends and finding confidence for a bit. Sorry if I start droning on and on.
I moved high school when I was about 14. At my new school I didn't have any friends, and I had a funny accent compared to the new kids. I wouldn't say I was shy at first, but what did make me shy was that no one was interested in me at all. No one wanted to start a conversation, and if I did start a conversation, it would reach its natural conclusion pretty quickly. No one bullied me, they nothinged me, if I can invent a new word. It was incredibly frustrating. This was a familiar feeling up until I turned around 20.
At aged 20 I got a job at a busy bar in town and suddenly my outlook on many things, especially people, changed. Suddenly people wanted to talk to me. The customers would just want to talk to me regardless at how shit my conversation skills were. No one else was listening to them, May aswell start talking to the barman. Girl customers would flirt with me (they were just having fun) which gave me more confidence, which in turn made people gravitate towards me more, which gave me even more confidence. People would invite me back to their apartments for after parties. I made new friends with the staff who got to me well due to the close knit environment we were working in.
The key here was confidence. It's a word that gets thrown around a lot and it almost seems mysterious. This was the only difference between the old me and new me. The only difference from people ignoring me and wanting to invite me to parties. I don't know you at all but I think you could benefit from it also. I'm not saying go get a job in a bar (you could if you want actually), but just find something that you can throw yourself into which will make you feel better about yourself. That's the reason people always recommend the gym, look good - feel good. That's one answer. You just need to find what's right for you, as I'm 100% sure based on what you wrote that's what you're missing. Everyone is naturally attracted to confidence, regardless of how you look or genuinely feel about yourself.
Oh, and people love talking about themselves.