How would I add speed modulation to my code

So I just finished programming this motor and I was wondering if I could add a version of this code bound to a different button but with a slower speed instead of it being at full power snippet4563

Use any speed you want to.
Although that top Select isn’t really doing anything. You can get rid of that. Just feed -1 into the second Select.

The two -1 constants? Also what value would I change to change the speed?

The -1 is your speed, so for instance, -0.5 would be 50% speed.

Do I need both of them or just 1?

Like this:
Select2

1 Like