Let $S$ be a scheme, let $T$ be an $S$-scheme, and let $M$ be a set. Let $M_{S}$ be the disjoint union of $M$ copies of $S$, considered as an $S$-scheme. (Notation from [SGA 3, Exp. I, 1.8].) Then $S$-scheme morphisms $T \to M_{S}$ correspond to locally constant functions $T \to M$, i.e. continuous functions $T \to M$ where $M$ is given the discrete topology. The functor $G_{0} : \operatorname{Set} \to \operatorname{Sch}/S$ sending $M \mapsto M_{S}$ is a sort of "partial right adjoint" to the functor $F : \operatorname{Sch}/S \to \operatorname{Top}$ sending $(T,\mathscr{O}_{T}) \mapsto T$, i.e. taking the underlying topological space of the $S$-scheme.
Can the functor $G_{0}$ be extended to a right adjoint $G : \operatorname{Top} \to \operatorname{Sch}/S$ of $F$?
My naive guess is to take a topological space $X$, give $X_{S} := S \times X$ the product topology and set $\mathscr{O}_{X_{S}} := \pi^{-1}(\mathscr{O}_{S})$ where $\pi : X_{S} \to S$ is the projection. Then $(X_{S},\mathscr{O}_{X_{S}})$ is indeed a locally ringed space and gives the usual construction when $X$ is a discrete space, but in general it is not a scheme. Consider $S = \operatorname{Spec} k$ and $X = \{x_{1},x_{2}\}$ the two-point set with the trivial topology; then the only open subsets of $X_{S}$ as defined above are $\emptyset$ and $X_{S}$ itself, so that $X_{S}$ is not even a sober space.
What if I restrict the target category of $F$ to the category of sober spaces?
The product of sober spaces is sober, so it's no longer immediately clear to me whether the above construction fails.