Motivation vs. Discipline
I truly believe that motivation is infinitely more powerful than discipline. Discipline is like a fuel injection to help get you started or to stick with something a little longer than what's comfortable. But at the end of the day discipline is a limited resource. Motivation however is limitless and it'll grow exponentially and keep you glued to your instrument through easy and hard times.
A classic example of discipline would be, "My teacher told me it's important to learn scales, so now I'm going to force myself to do this, because I want to be good."
Motivation on the other hand says, "All my favorite guitar players can play scales effortlessly and I love the sound of that, so I wanna work towards mastering that as well."
Which one do you think will get you the best results? Motivation will, because inherently it keeps you working towards things that are exciting to you, which not only helps you shape your identity as a musician. It also means you'll spend more hours because you want to and because what you're working on makes sense to you.
So what do you have to do to cultivate motivation? The biggest part is to be aware of why you're playing guitar and what your specific goals are. Maybe you want to learn chords, so you can play and sing. In that case you may not be super motivation to sit and practice all the patterns of the minor scale. And maybe you want to be a ripping virtuoso who can play impressive solos. In that case it may not be super motivating to sit and work on your campfire chords.
Many teachers would object to this and say that you'd only be working on the fun and flashy stuff and that there's more to playing guitar than that. But that's where I believe that it's the teachers job to motivate you to work on those things, it doesn't make sense to sit and practice metronome exercises, if you don't know why you're doing it!
It's my job as the teacher to try to make you see how the metronome exercises or the scale patterns can help you get to where you want to go.
So the short answer is to try to stay in a positive and determined headspace and keep an eye on your own personal compass: Why did you start playing guitar and where do you want to end up? That's what's going to make your motivation soar, and once it's going, it only gets stronger as you start to see the results.
It's also very important to keep referencing the situations, recordings or the videos that makes you want to play guitar. Stay inspired!