6 If the inequality $a \sin ^{2} x+\cos x \geqslant a^{2}-1$ holds for any $x \in \mathbf{R}$, then the range of real number $a$ is $\qquad$.
6 $a=0$ Hint: Let $\cos x=-1, \sin x=0, a \sin ^{2} x+\cos x \geqslant$ $a^{2}-1$, we get $a^{2} \leqslant 0$. And when $a=0$, the original inequality obviously always holds. Therefore, $a=0$.