How to stop user from holding down space bar?

Viewed 65

I am creating a scratch project where you have to press space bar to move and I have found an exploit: holding down space bar because the project is designed to improve your SBPS (space bars per second) not just hold down space bar. How can I stop the user from holding space bar then?

2 Answers

I already know that you are checking if the user is pressing the space bar, that's a good start!

You have to stop recording any space bar press when the user has pressed the space bar.

After that start recording the space bar press again once the user has released the space bar so that they would be discouraged from such an exploit.

Edit:

I also know that you want more explanation/code_block example:

Here's the example!

Just scroll down to enblazingfire's answer.

use [wait until <not <key [space] pressed?>>] This will prevent the code from running until they're not pressing the space bar.

Related