Consider the map f:R-->R defined by
f(x)= 1 if x is rational and =-1 if x is irrational
Then |f| is identically 1 so it is everywhere continuous, while f is nowhere continuous by the density property of the rational and irrational numbers.
In particular, for instance, let x_n be a sequence converging to 0 that contains an infinity of rational numbers and an infinity of irrational numbers and set a_n :=f(x_n). Then |a_n|-->1 but a_n does not converge because it has a subsequence converging to 1 and another converging to -1.
However, if |a_n|-->L and a_n converges, then it must be that a_n-->±L because if a_n-->P, and if
|a_n-P|<epsilon,
as soon as n>N, then because of the triangle inequality
||a_n|-|P||<=|a_n-P|,
it follows that
||a_n|-|P||<epsilon
as soon as n>N also.
But this is the same as saying that |a_n|-->|P|. So L=|P|. So P=±L.