I have fixed that now Vimal.
I’ve noticed a new problem:
The script only works when the Sensor is an Always Sensor.
I wan’t it to be a Keyboard Sensor, but when I make it a Keyboard Sensor the script doesn’t work anymore.
define “doesn’t work”. does it return an error? if absolutely nothing happens, and you have no clues, try uploading the file so we can try and find the problem