I think in the line
progressBar.transform.localScale = new Vector3(LoadProgress, progressBar.transform.localScale.y, progressBar.transform.localScale.z);
You meant to use
loadProgress
Since this is the name of your variable
↧