Counterexample around Dini's Theorem

Take $f_n(x)=e^{-\frac 1 {nx}}$ and $f=1$.

Note that $sup_x |f_n(x)-f(x)| \geq |f_n(\frac 1 n)-1|=1-\frac 1 e $.


Try $f_{n}(x)=1-(1-x)^{n}$ for $x\in(0,1]$ and $f=1$.


Your example $f_n(x) = x^{1/n}$ works fine. What you need is to show that for every $n$ there is an $x_n$ such that $|f_n(x_n)-f(x_n)|$ is greater than some positive constant, for example $x_n = 1/2^n$. That way $f_n$ cannot converge uniformly to $f$.