Motive is the main thing
Motive is the main thing
What makes an action good or bad is not just the action itself, but the motive behind it. If the motive is made good, then the doer need not worry no matter what the outcome is.
A doctor may use a scalpel to save a life. But a murderer may use it to kill someone. The tool and the action may be the same, but the motive makes it good or bad.