How can I replicate a variable from client to server?

Variables are only ever replicated from Server to Client, never the other way around. The only way to go from Client to Server, is via replicated functions, (and hence the option to validate this input before trusting it)