GetGlobalInt not working!

Hey, I’m trying to set a global int from the server and get it from the client, but it doesn’t seem to be working for the client - it prints the default value (which is set to -1) when it should be printing a 1 or a 2.


local Preparing = function()
      hook.Remove("TTTBeginRound","BEGINFUNROUND")
      hook.Remove("TTTEndRound","ENDFUNROUND")
      hook.Remove("Think","FUNROUND_THINK")
      rounds_left = GetGlobalInt("ttt_rounds_left",6)-1
      if rounds_left == 0 then
        if SERVER then
          SetGlobalInt("fun_round_num", math.random(1,2))
        end
        print(GetGlobalInt("fun_round_num",-1))