I'm looking for a sequence of functions $\{f_n\}_{n\in\mathbb{N}}$, continuous on the interval $[a,b]$ such that it converges to $f$ under the $L^2$ norm, defined as $$\lVert \rVert_2=\left(\int_a^b (f_n(x)-f(x))^2dx\right)^{1/2},$$ but not under the $L^\infty$ norm, defined as $$\lVert \rVert_\infty=\sup_{x \in[a,b]}\lvert f_n(x)-f(x)\rvert.$$
I've tried a bunch of functions, especially trigonometric functions. However, every time, I get stumped by the power of two in the definition of the $L^2$ norm.
Let $f_n(x) = x^n$ on $[0,1].$ Verify that $\|f_n - 0\|_2 \to 0,$ while $\|f_n - 0\|_\infty = 1$ for every $n.$