The Schwartz space is given by
$\mathcal{S}=\{f\in \mathcal{E}(\mathbb{R^n})| \lim_{|x|\rightarrow\infty}|x^{\beta}D^{\alpha}f(x)|=0 \text{ for all multi-indices } \alpha \text{ and } \beta\}$.
Let $f \in \mathcal{S}$. Then $\hat{f} \in \mathcal{S}$(^ represents Fourier transform).
Now Fourier transform of a real valued function produces a complex valued function. But Schwartz space has only real valued function. Where am I going wrong?