I am working about that the quotient of an affine set by a finite group has also a structure of an affine set.
In Algebraic Geometry by J.Harris (pgs 124-125) there is a construction of $Y = X/G$ given $X$ an affine set and $G$ a finite group. He defines $A(Y)$ as $A(X)^G$ and proves that $Y$ has an affine set structure and that its points correspond to the orbits of $X$ by the action of $G$. He also proves that the projection $\pi: X \rightarrow Y$ is surjective. (The way he do this is natural. Every time he uses the definition of $A(Y)$ and its properties.)
Until here, everything is clear and the only thing we must do is to prove that the map $\pi$ satisfies the universality property, i.e.,
every morfism $\rho: X\longrightarrow Z$ factors through $\pi$ if and only if $\rho(p) = \rho(gp)$ for every $x \in X$ y $g \in G$. \begin{equation*} \begin{gathered} X\\ ^\rho\swarrow \: _\varphi \: \searrow ^\pi\\ Z \enspace \longleftarrow \enspace Y \end{gathered} \end{equation*} Unfortunately I don't know how to do this. If someone can help me it would be great.
By the way, I know that this result also is true in the category of affine schemes, but I don't have the knowledge to understand that proof. I am only interested in the case of affine sets of the affine space $\mathbb{A}_k^n$. Thank you in advance!