Maybe anyone can help me with this. I'm trying to create a Random button that sets the StepSlider to random values everytime it reaches the first step. If I use the code posted below step 13 gets value 1 and the rest of the steps gets value 0. If I change rand() to another value, like (i/16), the stepslider takes a perfect saw so the formula seems to work. Anyone have a clue how to fix this?
I've added an example with a working and a not working script.