I found this example online:
Let $\{f_{n}\}$ be the sequence of functions on $(0,\infty)$ defined by $f_{n}(x)=\frac{nx}{1+n^{2}x^{2}}$ .This function converges pointwise to zero. Indeed, $(1+n^{2}x^{2})\sim n^{2}x^{2}$ as $n$ gets larger. So, $\underset{n\rightarrow\infty}{\lim}f_{n}(x)=\underset{n\rightarrow\infty}{\lim}f_{n}(x)=\frac{nx}{n^{2}x^{2}}.=\frac{1}{x}\underset{n\rightarrow\infty}{\lim}\frac{1}{n}=0.$
But for any $\epsilon<1/2$ , we have
$|f_{n}(\frac{1}{n})-f(\frac{1}{n})|=\frac{1}{2}-0>\epsilon$ .
Hence$ \{f_{n}\}$ is not uniformly convergent.
By the definition of pointwise convergence: $f_n(x)\rightarrow f(x)$ for all $x\in X$. But this does not seem to happen when $x=\frac{1}{n}$. So how can ${f_n}$ converge pointwise to zero for all $x\in (0,\infty)$ if $f_{n}(\frac{1}{n})=\frac{1}{2}$?
Is it correct to think like this: If $ \{f_{n}\}$ was uniformly convergent, then if someone gave me an $\epsilon<1/2$, I should be able to find and $n\geq N$ so that $|f_{n}(x)-f(x)|$ became smaller than $1/2$ for any $x \in (0,\infty)$, but this doesn't hold for any $x$ because we saw that $|f_{n}(\frac{1}{n})-f(\frac{1}{n})|=\frac{1}{2}-0>\epsilon$, so ${f_n(x)}$ cannot be uniformly convergent.