The computer thinks you want to move right, but there is something in the way so it is impossible to go right so it stops.
I guess what you should do is make events to tell the computer what you expect it to do when the player is pressing right, but going right is impossible.