Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Why isn't changing score working if touching sprite?
- hippo_kid5737
- Scratcher
44 posts
Why isn't changing score working if touching sprite?
Hi!
I am wondering why my score is not working when changing sprite.
This is my program.
I am wondering why my score is not working when changing sprite.
This is my program.
when green flag clicked
forever
if <touching [ button2v] ?> then
change [Score v] by (1)
end
Unfortunately, when the sprite is touching button2 it either doesn't change the score or when it does it changes by up to 80.
Please help me ASAP.
Last edited by hippo_kid5737 (Sept. 17, 2018 07:32:02)
- Scratch-Minion
- Scratcher
1000+ posts
Why isn't changing score working if touching sprite?
The code you show above would work fine.
You will need to share your project as the problem must be elsewhere.
You will need to share your project as the problem must be elsewhere.
- hippo_kid5737
- Scratcher
44 posts
Why isn't changing score working if touching sprite?
Hi Scratch-Minion,
This is the link to the game.
https://scratch.mit.edu/projects/246213899/#editor
As you will be able to tell it is also the same game that the score isn't working.
Also i agree with u in theory the code should work but it doesn't.
Thanks
This is the link to the game.
https://scratch.mit.edu/projects/246213899/#editor
As you will be able to tell it is also the same game that the score isn't working.
Also i agree with u in theory the code should work but it doesn't.
Thanks
Last edited by hippo_kid5737 (Sept. 18, 2018 06:35:22)
- Scratch-Minion
- Scratcher
1000+ posts
Why isn't changing score working if touching sprite?
You need to share the project for us to see it via the link.
- deck26
- Scratcher
1000+ posts
Why isn't changing score working if touching sprite?
Addressed the problem in your other topic - you're assuming the scripts run at the same time but they don't so the button can move before the ball detects the touch.
- hippo_kid5737
- Scratcher
44 posts
Why isn't changing score working if touching sprite?
I don't understand what u mean but have u detected the problem?
- hippo_kid5737
- Scratcher
44 posts
Why isn't changing score working if touching sprite?
Hi deck26 thx fro looking at it
Just ignore that last post I understand it now,
Just ignore that last post I understand it now,
- Discussion Forums
- » Help with Scripts
- » Why isn't changing score working if touching sprite?