I'm making a paddle ball game on Scratch (just for fun), and I'm running into a problem with my scoring. If you want to look at the code I already wrote, the link to the game is https://scratch.mit.edu/projects/66541388/ . For some reason, when the game is played the score variable does not actually always change by one. It changes by a different number every time I test it. Any ideas on what the problem is or how to fix it?
Here's the core of the code:
when green flag clicked
set [Score v] to [0]
set x to (0)
set y to (0)
point in direction (pick random (-90) to (90))
forever
if <(y position) < [-146]> then
broadcast [gameOver v]
stop [all v]
end
if <touching [Paddle v]?> then
change [color v] effect by (pick random (1) to (1000))
change [Score v] by (1)
point in direction (pick random (-90) to (90))
end
move (10) steps
if on edge, bounce
end