Proof that if $f:S^{n} \to \mathbb{R} $ is continuous, then is not injective I have to prove that if $f:S^{n} \to \mathbb{R} $ (where $S^{n}= \{(x_1, ..., x_{n+1})\in\mathbb{R}^{n+1} |  x_1^2+...+x_{n+1}^2=1\} $ is continuous, then is not injective. If possible, I would like it to be proven by using connectivity arguments.
My attempt: suppose $f$ is injective. Let $p\in f(S^n)$ and, since $f$ is injective, there exists only one $q\in S^n$ such that $f(q)=p$. We consider now $f_{|S^n \setminus\{q\}}:{S^n \setminus\{q\}} \to f(S^n\setminus\{q\})=f(S^n)\setminus\{p\} $, which is continuous and bijective (because $f$ was continuous and injective). Then, since ${S^n \setminus\{q\}}$ is path-connected and $f$ is continuous and exhaustive, we have that $f(S^n)\setminus\{p\}$ is path-connected as well.  Here I would like to use that $\mathbb{R}\setminus \{p\}$ is not path-connected and arrive at a contradiction, but this is wrong.

Since $S^n$ is compact, if $f$ was injective, it would be a homeomorphism onto $f(S^n)$. But $S^n$ is compact and connected and the only subsets of $\mathbb R$ which are compact and connected are the the intervals $[a,b]$. However, if you remove one point from the middle of this interval, it becomes disconnected. No point of $S^n$ has that property.
