Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » scripts plays only once
- Big_Man_Alula
-
6 posts
scripts plays only once
I'm trying to make it as to where the scripts plays only once after clicking on the sprite, but the script keeps repeating every time I click the sprite.
- medians
-
1000+ posts
scripts plays only once
You want to make a variable to check if you have activated the script, and do something like this:

This will only allow them to click when check is 0 (or before they click), but then right when they click check is set to 1 so they can't click it again.
If you want them to be able to click it again after the code fully runs, replace the bottom code with:

Setting check to 0 again will make it possible to click again.

This will only allow them to click when check is 0 (or before they click), but then right when they click check is set to 1 so they can't click it again.
If you want them to be able to click it again after the code fully runs, replace the bottom code with:

Setting check to 0 again will make it possible to click again.
Last edited by medians (Feb. 5, 2023 03:13:17)
- Discussion Forums
- » Help with Scripts
-
» scripts plays only once