Problem with is a button pressed

idk if this is intended but when you use is a button pressed it also happens when held? is there any way I can get it to not do that?

2 Likes

yes, I usually set it to on released for single button presses.

2 Likes

You can use a wait until to wait until the button is not pressed at the bottom of the logic block code.

3 Likes

could you show an example?

1 Like

That is intended. You could follow redSprite’s advice or you can use the On Button Pressed block to run code only when the button goes from not pressed to pressed. The little Boolean insert “Is Button Pressed” block will be “true” as long as the button is pushed down and “false” only when the button is not being held down.

2 Likes