How to change text based on the value of a scrollbar?

I’m making a character creation screen with stats and I want a scrollbar to change the displayed text (the higher the value, the higher the stat). I’m using only standard UI elements provided by unity, so I’m using GameObjects Text and Scrollbar. I know it’s the “value” variable in scrollbar I’m after, but I don’t know how to access it. I’ve made a script in the Text game object but I have no clue of how to go from there.

For the few who care I figured it out. I made the custom script to use the GetComponent and GetComponentInChildren functions, and I made the text a child of the scrollbars. Then I used the toString method to convert the integer to string so it could be put into the text.text