Here's a breakdown:
1. "However" as a conjunctive adverb:
When "however" introduces a contrasting idea, it acts as a conjunctive adverb and requires a comma before it.
* Example: "The weather was terrible. *However,* the game went on as scheduled."
2. "However" as an adverb modifying an adjective or verb:
When "however" modifies an adjective or verb, it doesn't need a comma before it.
* Example: "The team played *however* they could despite the rain."
3. "However" at the beginning of a sentence:
When "however" starts a sentence, it always needs a comma after it.
* Example: *However,* it was a close game.
In short:
* Comma before "however" if it introduces a contrasting idea.
* No comma before "however" if it modifies an adjective or verb.
* Comma after "however" if it starts a sentence.
Let me know if you have any other grammar questions!