Example of a sequence of continuous functions in which it converges I was studying the following exercise but I don't understand why the example meets the requirements
Show an example of a sequence on $\{f_n \}$ of continuous functions in $[0, 1]$ that converges to a function continuous $\{f \}$ and a sequence of points $x_n$ in $[0, 1]$ which converges to some point $x_0 \in [0,1]$ so that $f_n (x_n) $ does not converge to $f (x_0)$.
A possible example:
$f_n(x) = \begin{cases} n \cdot x & \text{if} & x \in [0,\dfrac{1}{n}]\\-n \cdot x + 2 & \text{if} & x \in ]\dfrac{1}{n},\dfrac{2}{n}] \; for \; n \geq{3} \; \\0 & \text{if} & x \in ]\dfrac{2}{n},1] \end{cases}$
I don't understand why this function meets the requirements
Thanks

For $ x= 0$, we have
$$f_n(0)=0\implies \lim_{n\to +\infty}f_n(0)=0$$
Fir $ x>0 $ and $ n$ great enough to satisfy $ x>\frac 2n $, we have
$$f_n(x)=0\implies \lim_{n\to+\infty}f_n(x)=0$$
So, the sequence $(f_n)$ converges in a pointwise way at $ [0,1] $ to zero function which is continuous.
and with
$$x_n=\frac{3}{2n} \text{ and } x_0=0,$$
$$f(\frac{3}{2n})=-\frac 32+2=\frac 12$$
because $$\frac 1n<\frac{3}{2n}\le \frac 2n$$
This simply proves that the convergence is not Uniform at $ [0,1]$.
