Unless the target takes the Hide action to hide, the character would know where the target is and the attack would be with neither advantage or disadvantage. The heavily obscured area is valid for both, unless a special sense is in play.
The Darkness spell blocks normal vision and darkvision. A creature inside the area of the Darkness spell can't see and can't be seen without the help of a special ability.
If an enemy can't see you, you have advantage on attack rolls against them.
If you can't see an enemy, you have disadvantage on attack rolls against them.
If circumstances would impose both advantage and disadvantage on a roll, you're considered to have neither.
Unless the target takes the Hide action to hide, the character would know where the target is and the attack would be with neither advantage or disadvantage.
Hiding doesn't change anything about the attack roll since the enemy can't see the attacker either way.
if a player casts darkness to hit the player would be at disadvantage or would they not be able to hit due to the inability to see them?
Unless the target takes the Hide action to hide, the character would know where the target is and the attack would be with neither advantage or disadvantage. The heavily obscured area is valid for both, unless a special sense is in play.
The Darkness spell blocks normal vision and darkvision. A creature inside the area of the Darkness spell can't see and can't be seen without the help of a special ability.
If an enemy can't see you, you have advantage on attack rolls against them.
If you can't see an enemy, you have disadvantage on attack rolls against them.
If circumstances would impose both advantage and disadvantage on a roll, you're considered to have neither.
The Forum Infestation (TM)