The program isn’t freezing, as far as I can tell. The reason that the left arrow isn’t working is that the program is calling move_right() after move_left(). When the left arrow is held down, the following things happen:
- move_left is called and checks for whether the left arrow is down. It is, so it sets the velocity to -10.
- move_right is called and checks for whether the right arrow is down. It isn’t, so it sets the velocity to zero.
Because the velocity is now zero, the sprite does not move.
The way to avoid this is to use “else if” rather than two if statements. You can access that my clicking the “+” at the bottom of an if/else block. It runs two conditions. You can look at the rexmix here. Notice that if the first condition is true, it runs the code for that condition and then doesn’t check for any of the other ones. It only runs the “else” if none of the conditions are true. Here’s a remix: https://studio.code.org/projects/gamelab/hlybShp5Bo7uQ1ngLfhMP14w2efBzrFtGcNYh0conKw