If a creature gains hexproof in response to a spell or ability controlled by an opponent that only targets that creature, then when that spell or ability tries to resolve, all of its targets will be illegal. As a result, that spell or ability won't resolve and none of its effects will happen.