You have to take a penalty drop, which is two club lengths from the nearest point of relief. The nearest point of relief being no closer to the hole.
In fact for a ball declared unplayable you have 3 options:-
1) Return and play another shot from a point as near as possible to where that ball was last played (stroke & distance).
2) drop the ball within 2 club lengths of where the ball lies, no nearer the hole.
3) Drop as far back as you like keeping the position of the ball in line with the flag.
Chat with our AI personalities