I've been learning the guitar on my own for at least three years now. I've managed to become fairly decent at playing, as well as teach myself a bit of music theory. When I play songs from bands, either by looking up the tabs or doing it by ear, I catch on quick and can play them pretty well.

The problem I have though, is that every time I try to come up with my own riffs, they either sound like simple, generic rock, or Christmas music. In that, I mean that I am kind of new to scales and theory and I don't quite seem to understand any kind of formula to making good rock riffs.

If I am playing in the key of G, for example, and I only play notes that are in the major scale of G, it sounds lame as hell. Or repetitive as hell, no matter what combination or order of notes I play.

If I don't only play notes in that scale, then I am left with just randomly adding other notes in, which seems to have no method or formula for sounding good whatsoever.

When bands, or just any guitar players write songs, how do you figure out what will sound good/what will rock, aside from just randomly guessing?
Some notes/scales in a key go good together and some don't, and for me I don't know the difference. Pointless post. Im ashamed..
"See, you're born punk. When you get your first haircut, then you're alternative. Then you let it grow long, then you're metal." - Kirk Hammett
try using different scales, and modes, also try adding in 5ths or 7ths, bending from awkward notes into notes in the scale... screw it, just watch this


[yes, the whole thing, i know it's long, but it's worth it]
My League of Legends stream
The morning will come
In the press of every kiss
With your head upon my chest

Where I will annoy you
With every waking breath
Until you, decide to wake up