[SOLVED] My script doesn’t work

hi can someone help with my walking script because it seems when i walk nothing happens so please take a look
https://playcanvas.com/editor/code/1069501?tabs=131795397,131840810

Hi @leon_McCulloch and welcome!

Did you save the script? You always need to save the script before the changes are applied. You can use CTRL+S to save the script.

Make also sure that the script is applied to an entity in your scene. Otherwise your script is not working either.

Please let me know if this helps.

i have saved it and imported it into the play but when i play, there is an error. Could you help me fix it
https://playcanvas.com/editor/scene/1733144

also how can i import models to the game?

If you click on the error, you get to see the line of code that is causing it. In this case it’s probably the dot after add on line 8, that need to be removed.

You can use the right mouse button on the asset panel of the editor, to upload a new model.

could you give me walking script because when i delete the error, another one appears and every tutorial doesn’t work

If you click on the Asset Store (bottom right of the scene) and then select Template, you can add the First Person Controller.

ok thank you for helping me with my walking script and i will come back to you if i need help again

1 Like

hi i have another problem, when i launch my game, i cant see the walls that i have placed and i have refreshed it and nothing happens.
https://playcanvas.com/editor/scene/1733144
https://launch.playcanvas.com/1733144?debug=true

You can create a new topic for a new problem next time.

It looks like there is no camera in your scene. Did you remove the Camera entity?