[RPG] How does the Disengage action interact with opportunity attacks when invisible

dnd-5einvisibilityopportunity-attack

I've got an encounter planned involving several creatures who were modified by magic to be able to camouflage themselves to such an extent that the only time they are visible is that instant when they attack a player (think active camo from the Halo series). I've read up on rules for attacking from stealth and attacking a 'hidden' enemy, but I was unable to find anything about how disengaging would go into it.

Currently I plan on having those creatures that leave without using a disengage action provide an opportunity attack from the nearby players albeit with disadvantage due to the camouflage. Would this be an accurate ruling, or would it be more correct to say that, since they are exceptionally hidden, the players would be unable to do an attack of opportunity?

Best Answer

Opportunity Attacks Depend on Sight

As per the basic rules:

You can make an opportunity attack when a hostile creature that you can see moves out of your reach.

If the character can see the enemy, they can use their reaction to make an opportunity attack.

If they cannot see the enemy, they cannot take an opportunity attack.

Use Ready Action to Attack Briefly Visible Enemy

This assumes that attacking renders the enemy visible, and it then gets some sort of free action to become invisible again. In this case, a character could use the ready action to strike as soon as the enemy become visible. However, that means characters with extra attack won't get to use that feature.