My understanding of replication (which is pretty limited) is that setting a property to replicated ensures it will be replicated from the server to the client, not the other way around. So once you have set the value on the client, you need to send that back to the server which will then replicate the value to the other clients.
But that’s the thing, i dont want to send the value from the client to the server. I changed the value on the client and i want the server to force it’s value again. Using the previous example, on the server the value is 2 and i changed locally the client to 3 and i want it to revert to 2 again automatically, almost like a cheater would change it’s health to 999 and the server resets it to 100 because it’s the value he has.
The server only replicates to the clients when it knows the value has been changed. In your case the value is only being changed on the client so the server knows nothing about it.
If your client is cheating then as long as you still only apply the game rules on the server it shouldn’t matter. The client might cheat and show that health is 999, but the server will know that his health is really 100.
I was under the impression that each client has a copy of the values on the server and periodically (i’m not sure if it’s every tick) he compares the current value with that copy and if it’s different he replaces it