Spot on. I began role-playing when I was 12 and I was going through an awful adjustment to middle school. Everybody made fun of me. Nobody liked me (I had terrible hair, I've stuttered my whole life, and I was just very awkward) and I felt absolutely low low lower, so when I found something that I was pretty okay at that made me feel important and included, I took it and ran with it. I found many, many friends through that back then, and I still have those friends today. It's one of the best things I ever came across, and it also helped me develop my writing skills. ;p
This is also why I don't rage at people for Mary Sue characters, I just let them be until they grow out of it. I remember when I just started RPing, my character had long purple hair, eyes that changed colors, a wardrobe full of awesome clothes, was super slim and gorgeous, and had a flying pet tiger. She could do everything because I felt like I couldn't do anything. When someone much older than I pointed out to me that she was 'stupid' and a 'mary sue' I was absolutely crushed to find that I was doing it wrong, the one thing I felt mattered. It was very upsetting and RPing was ruined for me for about a year because I was trying so hard not to be a Mary Sue, ya dig?
RPing is a doorway to a different world, at least for a little while.