Precompose, then mask it out.
I'm already triggered
I guess you mean to animate text with a slider.
Add a slider control (expression controls) to your text layer, and then, add this expression into your Source text:
If you add this expression to an expression slider it will only return whole numbers.
You will not be able to manually grab the slider control and make adjustments but you will be able to scrub through the values in the expression control and only end up with whole numbers.
If you want to add a % sign to the slider control you can't do that, but if you want to use the slider to drive a text layer then francoisg32545302 has given you an expression that will work. It will help us a lot if we knew what you were trying to accomplish.
Rick, you can always write the "Value" before the "math.round", then you can change the digits straight from the effects control.
something like this:
value = Math.round(effect("Slider Control")("Slider"))
Hey thanks It worked for me...
I use this and works too:
I just delete the %
Cleaner way is this, and you can change the number from zero to set decimal places...
effect("Slider Control")("Slider").value.toFixed(0) + "%"
If you add an expression to the slider you lose the ability to use the slider in the effects control panel. If you use value.toFixed(0) or Math.round() in the property then the slider will still function in the effects control panel.