Can we realize a distance minimizer via converging sequences? Let $X$ be a Riemannian manifold*, and $S$ a compact submanifold of $X$. 
Assume there exists an open, dense subset $Y$ of $\,X$, such that for any element $y \in Y$, there exists a unique element in $S$ closest to $y$; i.e there is a function $\tilde s:Y \to S$ such that $$ d(y,\tilde s(y))=d_S(y)=\inf\{d(s,y)|\, \,s \in S\},$$
and $\tilde s(y)$ is the only element in $S$ satisfying the above equality.
Question:
Let $x \in X$, and let $\tilde s \in S$ be a closest element to $x$ in $S$. (such an element exists by compactness of $S$). 
Is it true that there exists a sequence $y_n \in Y$, $y_n \to x$, such that $\tilde s(y_n) \to \tilde s$?
Note that I do not assume $x$ has a unique closest point on $S$. (If this were true the question would become trivial; On any subset consisting of elements which have unique closest points, the "closest point mapping" $\tilde s$ is continuous).

*(Actually, one could ask the question in a more general setting when $X$ 
is a metric space, and $S$ is a subset of it, but I am not sure which "strange pathologies" can arise then)
 A: Yes 
$c(t)$ is a shortest geodesic from $c(0)=s_0\in S$ to $c(1)=x$ For some $0<t_0<1$ assume that $$d(c(t_0),S)=d(c(t_0),s_1) \leq d(c(0),c(t_0)),\ s_1\in S$$
Then $$ d(x,S)\geq d(c(t_0),x) + d(c(t_0),s_1) \geq d(x,S) $$
It is a contradiction So $s_1=s_0$ If $y_n\in Y$ goes to $ c(t_0)$, then by uniqueness of $s_1$ corresponded points in $S$ wrt $y_n$ goes to $c(0)$ When $t_0$ goes to $1$, then we have $y_n$ wrt $c(t_0)$ So we can take $y_n$ converging to $x$
A: I am adding some details to the answer of HK Lee:
We assume $X$ is geodesically convex, i.e there is a minimizing geodesic between every two points. (In particular, our argument holds for any complete manifold).
Let $x \in X$, and suppose $s_0$ is a closest point to $x$ in $S$. Let $c:[0,1] \to X$ be a minimizing geodesic from $x$ to $S$, i.e $c(0)=x,c(1)=s_0$.
We begin with the following observation:
Lemma (1): For every $0<t_0<1$, $s_0$ is the a unique closest point to $c(t_0)$ on $S$.
Proof Lemma (1):
The fact $s_0$ is a closest point to $c(t_0)$ is trivial. 
Assume $s_1 \neq s_0$ satisfies  $$d(c(t_0),s_1) = d(c(t_0),S) = d(c(t_0),s_0),\ s_1\in S$$
Let $\gamma$ be a minimizing geodesic from $c(t_0)$ to $s_1$.
Look at the concatentation $\gamma * c|_{[0,t_0]}$; $$L(\gamma)=d(c(t_0),s_1)= d(c(t_0),s_0)=L(c|_{[t_0,1]}),$$ so
$$L(\gamma * c|_{[0,t_0]})=L(c|_{[0,t_0]}) + L(\gamma)=L(c)=d(x,s_0)=d(x,S)$$
$\gamma * c|_{[0,t_0]}$ is therefore a broken path (not smooth at $t_0$) connecting  $x$ to $s_1$. Since a minimizing path between every two points must be smooth, it follows that $ \gamma * c|_{[0,t_0]}$ is not a minimizer, i.e $d(x,s_1) < L(\gamma * c|_{[0,t_0]})=d(x,S)$ which is a contradiction.

Lemma (2): For every $0<t<1$, there exists a sequence $y_n \in Y$ such that $y_n \to c(t), \tilde s(y_n) \to s_0$.
Proof Lemma (2):
Let $0<t<1$, and let $y_n \in Y, y_n \to c(t)$. $$(1) \lim_{n \to \infty} d(y_n,\tilde s(y_n))=\lim_{n \to \infty} d(y_n,S)=d(c(t),S)$$
Since $S$ is compact, we can assume W.L.O.G that $\tilde s(y_n)$ is converging to some $\tilde s \in S$. Thus,
$$ (2) \lim_{n \to \infty} d(y_n,\tilde s(y_n))=d(c(t),\tilde s) $$
$(1),(2)$ imlpies $d(c(t),S)=d(c(t),\tilde s)$
Lemma (1) implies $\tilde s=s_0$.

Proof of the main proposition:
Define $t_n=\frac{1}{n}$. By Lemma (2) (applied for each $t_n$), there exists $y_n \in Y$ such that $d(y_n,c(t_n))<\frac{1}{n}$, and $d(\tilde s(y_n),s_0) < \frac{1}{n}$. Thus, $y_n \to x, \tilde s(y_n) \to s_0$, as required.
