Speed button in blocks

I know there are threads on this but I wanted to make my own. How would i code so when a button is pressed it will go from 50 velocity to 25 velocity i have attempted and failed miserably. Any help would be great!

Just a simple “if button pressed then set drivetrain velocity to 25%” should work

1 Like