Unfortunately, many times I toe the line between sinning and obedience. I think about sinning. I imagine what I would do. Or I fail to keep my mind off of it. I have a desire to obey God but I also have a desire to sin. So what do I do this happens? Most of the time, I try to keep my mind off of it. However, trying to keep your mind off of sin is like saying, "Don't think about a pink elephant." Most of the time you'll think about it. I think we all struggle with this from time to time.
So here's the thing. A great way to help you resist temptation to sin is to go to someone (your mom, dad, sibling, or good friend) and tell them that you're struggling with it and ask them to pray for you. That can be hard. It's embarrassing to tell someone that you're struggling with sin. But it's so important. If you really take obedience seriously, you'll see that it's more important to embarrass yourself in order to obey God. What is more important, other people thinking that you're perfect, or God being glorified? Does that make sense? It can be so hard, but it can be so good to ask for prayer. Perhaps they'll pray with you on the spot. Whatever the case, I encourage you to include others in your walk with God. Sometimes it can be so hard to fight sin on your own. When it is, ask someone to pray with you and hold you accountable. It's well worth it.