Its suppost to take input form Keyboard but this script does NOTHING!

Welcome!

First, let me point you to the post about using code tags . This will format your code so that it’s easier for the rest of us to read.

Looking at your code, I don’t see where you’re using any input at all. I’m guessing you got this bit of code from a tutorial. It seems you may have missed copying something before this piece that actually collects the keyboard input and processes/stores it (in that moveHorizontal variable, perhaps?) before this code is supposed to be executed.

Could you share the tutorial you’re working with, and the full contents of your script file?

3 Likes