Lady Elanor Mimetes wrote:
Do you think you can portray a good guy, not a perfect good guy but someone who maybe lives in a way that some people might frown upon. Would you be worried that you'd then be condoning that way of life, or do you think it's possible, and okay, to write such a character and portray them as the good guy in your story.
I think it's fine, as long as you portray it in the right way. For example, a man who’s an alcoholic might save some children from a serial killer, and it is his saving the children that would be meant to inspire us, not his whole life. However, the ways his sinful addiction is hurting him and others should be shown. While showing redemption is ideal in fiction, if you are telling a true story where the man never learned better, just showing the damage of sin is enough.
You could also contrast the good guy who is living in and being hurt by a sin with a side character who is living righteously. Continuing the example of a man who’s an alcoholic, he could see his wife leave him and the terrible pain of his children, while a side character who overcomes alcoholism has a happy marriage and children at peace.