Ok, why are you limiting this to the Server? With the Switch, you prevent the client from updating the variable. It will just stay at its default value. At least if you don’t modify the value somewhere else too.
If you want to calculate this on the server and replicate it to the client, you need to set the variable to replicate. Then the client will get the correct value.
I would also not work with a delay in the tick. Better use a timer and seperated function for this.