This has been asked many times before. The PlayerScripts folder is created locally. You can’t get it from the server. Use a LocalScript or move UpgradesIntValue to somewhere the server can see.
Also game.Players:FindFirstChild(player.Name) is redundant since you already have the player???