This is a coding issue, so open up your event sheet.
Keyboard button right is pressed
And player is not falling - simulate player moving right
Then do the same for left movement.
You'll need to do similar changes for any other kind of action your player can do to prevent this problem from occurring again.