Weird bug with slider and math

To get rid of the decimal from the slider’s percent value you would want to floor it before using it. Doing the floor after your calculations will cause greater rounding error.