There are times when we write when the doubt creeps in. What you have to remember is that you aren’t the only one feeling like you don’t know what you’re doing with your character/plot/ending. Just keep working, write even though it may not be your best, the true answer will come to you. You are the creator of your story’s universe, you can do this!