Problem with movements script in BGE I'm pretty new to the bge, which I'm using for a school project and right now I'm having a problem with my movements.py script. I know this question is quite 'noobish' but I just can't find the problem. The 'player' object is just a cube with character physics and actor enabled but won't move when I start the game simulation and press the different keys. 

import bge


def main():

    cont = bge.logic.getCurrentController()
    player = cont.owner

    keyboard = bge.logic.keyboard

    if keyboard.events[bge.events.WKEY] == bge.logic.KX_INPUT_ACTIVE:
        player.applyMovement((0, .2, 0), True)    

    if keyboard.events[bge.events.SKEY] == bge.logic.KX_INPUT_ACTIVE:
        player.applyMovement((0,-.2, 0), True)  

    if keyboard.events[bge.events.AKEY] == bge.logic.KX_INPUT_ACTIVE:
        player.applyMovement((-.2, 0, 0), True)

    if keyboard.events[bge.events.DKEY] == bge.logic.KX_INPUT_ACTIVE:
        player.applyMovement((.2, 0, 0), True)

main()
TLDR: You need to enable True Level Triggering.
By default the &quot;Always&quot; Sensor only runs once, when game starts.
Any time you need something &quot;always&quot; triggered then you must click the little button with the three dots on the right side of the &quot;Always&quot; Sensor called &quot;True Level Triggering&quot; (I have it marked in red in the image below).

So your script works fine, just it was not running during the game.