Definition. A morphism of schemes $f\colon X\to S$ is called locally projective if there is an open covering $S=\bigcup_{j\in J}V_j$, integers $n(j)\geq 0$, and closed embeddings $f^{-1}(V_j)\hookrightarrow\mathbb{P}^{n(j)}\times V_j$ over $V_j$.
(This is equivalent to what's used in the Stacks Project, cf. [Tag 01WB]).
Let $A$ be a ring, $S=\operatorname{Spec}A$, $f\colon X\to S$ a locally projective morphism. Does there exist an integer $n\geq 0$ and a closed embedding $X\hookrightarrow\mathbb{P}^n\times S$? This is trivially the case if $A$ is local.