You have to get a reference to YOUR progress bar in the scene. Then you can then set the .value property of that progress bar.
You're trying to set a value on a static reference to UIProgressBar from UIProgressBar itself, which may or may not be null at that point. Either way, don't do it like that.