Let $S$ be a set, and let $X$ be a topological space. For each open set $U\subset X$ let $\mathcal{F}(U)$ be the collection of locally constant maps from $U\to S$. These are locally constant in the sense that, for every $p\in U$, there is some $p\in V\subset U$ where $f|_V$ is constant.
I want to show that this gives us a sheaf. I imagine the restriction maps are simply function restriction, and in such a case, the presheaf axioms are immediate.
Then for us to show that this forms a sheaf, we need to verify both identity and gluability.
For the former, it seems that if $\{U_i\}_{i\in I}$ is a cover of some $U\subset X$, and $\text{res}^U_{U_i}f = \text{res}^{U}_{U_i}g$ for each $i\in I$, i.e. $f|_{U_i}=g|_{U_i}$ for each $i\in I$, it is clear that $f\equiv g$ on $U$ and thus $f=g\in \mathcal{F}(U)$. So identity is immediate
For the latter, we need $f_i\in \mathcal{F}(U_i)$ for each $i\in I$ such that they agree on intersections: $$f_i|_{U_i\cap U_j}=f_j|_{U_i\cap U_j},$$ and that this induces an $f\in \mathcal{F}(U)$ that restricts to each of these. This $f$ must be locally constant. We can just let $f$ be defined globally (on $U$) by $f=f|_{U_i}$ on $U_i$, and this is well defined on each point in $U$, since any point $x\in U$ that lies in multiple of the $U_i$ has all of the $f_i$ agree o it. It is also still locally constant, since every point had a neighbourhood in some $U_i$ where $f_i$ restricted to that was constant, and we can restrict $f$ down to that.
It feels like I am writing a whole bunch of crap. How do I write this more succinctly, is it even correct?
Let $X$ and $Y$ be topological spaces. Define a presheaf $\mathcal F$ on $X$ by $\mathcal F(U)$ is the set of continuous maps $U\to Y$. Restriction maps are restrictions. Then $\mathcal F$ is a sheaf; sections satisfying glueing conditions glue together to make a mapping, and is continuous, as a locally continuous map is continuous.
Now let $Y$ be $S$ with the discrete topology.
Your argument is basically this, with "locally constant" replacing "continuous".