Server Dosent Read Client Variable?

Well this has probably been posted a bunch but even after reading them im just not understanding it. All im trying to do is ive got a variable (testnumber) and i have a button setup so when i click the button the value goes up one i click the button on the server and both the server and client see’s it i click the button on the client and only the client see’s it. How am i supposed to fix this? I have tried using a replicated function but it still does not work (maybe because it not the owning client but how do i get around this)? Thanks for any help in advance!!!

You cannot ever replicate variables TO the server, you MUST use an RPC function.

Server RPC functions MUST be called on (not necessarily by) an object owned by the client calling the function. So anything owned by its player controller. The PC itself, player state, pawn, etc.