If you are considering to actually know something about music (and its theory), consider taking some lessons.
If you are being less serious, and just intrested in playing Guns 'n Roses riffs, then the allmighty Internet and all its unprofessional youtube-guitarists are decent enough friends for you.
Im not saying that either would be better or worse. Just consider what goals you want to achieve, and how much are you willing to work and what you have to do in order to achieve 'em.
I took lessons for five years weekly, and nowdays I play and teach for my profession. No regrets here

This isn't 100% true. Many great musicians never took formal lessons.
Only lessons I'd ever take are music theory.