How to put an option to change the speed?

How do some people know about 8-bit games like Super Mario Bros when you keep pressing the button to run it runs and when you release the button it walks. I would like some help to have exactly the same function

1 Like

Here is a simple example that does it:
run help
Basically, when the run key is pressed the object goes on a higher speed, when it isn’t pressed it goes on a slower speed.

1 Like

It does’nt work. I click on the button it will just move forward but not increase the speed

1 Like

Did you change the keyboard to the desired key? If that didn’t work, could you show your game?

so I’m going to say it like this is the function I want to do its a (Sprint Button)

And this doesn’t work?

nah. its doesn’t work

when I press the button the character slides by itself

The images has it connected directly to the Velocity, but it should instead be going to the (Set) input on another Number behavior.
Then the Movement button would cause that Number to go to the Velocity

Its not works. how I can sprint with shift while still pressing my movement buttons?

1 Like

If you are making a platformer, this would help.

If you want to copy the code, tell me.