The official website for The Settlers of Catan

Question about Candamir - The First Settlers Hex - Let’s assume that I have to pass a test by rolling a “6,” and an opponent is able to hex me. May I roll the die anyway, in order to reach the space my goal token is on?

Answer

First you declare that you want to pass a test; only then may your opponent shout “Hex” before your die roll. As a result, you'll fail the test without having rolled the die, but you may move onto the space your goal token is on.