Consider $(X,d)$ a metric space and $K \subseteq X$ a compact subset. I am trying to build a sequence of Lipschitz functions $f_n : X \to \mathbb R$ s.t. $f_n \to \chi_K$ uniformly.
If we try to build $$ f_n(x) := 1 - \max \{n d(x,K), 1 \} ,$$ we don't have uniform convergence because we have problems just outside the boundary of $K$ (more specifically, we can find $x \not \in K $ s.t. $d(x,K)$ is arbitrarily small, thus $ \sup _n \sup_{x \not \in K} |1 - \max \{ n d(x,K), 1 \} | = 1$).
Is there some sequence of Lipschitz functions which converges uniformly to $\chi_K$, or does the kind of behaviour outlined before always happen?
If $f_n$ converge uniformly, then the limit (in this case $\chi_K$) will be continuous. In most cases, this is false (for example for $K \neq \emptyset$ and $X = \Bbb{R}^n$).
To see this, note that (by the intermediate value theorem) $\chi_K$ would have to attain the value $1/2$ if it was continuous.