You're most likely only running that code once so it will only happen on first execution. I see a couple of errors, first you're using a float field max value while calling on an intSlider. If you're okay with integers then it doesn't matter, MEL is forgiving when converting some datatypes. Secondly you need to add a…