# \[SOLVED\] My script doesn’t work

**URL:** <https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959>\
**Category:** Help & Support\
**Tags:** learning, scripting\
**Created:** [May 1, 2023, 9:42am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959 "2023-05-01T09:42:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 9:42am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/1 "2023-05-01T09:42:53Z")

</div>

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](https://playcanvas.com/editor/code/1069501?tabs=131795397,131840810)

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [May 1, 2023, 10:05am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/2 "2023-05-01T10:05:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 10:07am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/3 "2023-05-01T10:07:55Z")

</div>

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](https://playcanvas.com/editor/scene/1733144)

---

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 10:10am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/4 "2023-05-01T10:10:12Z")

</div>

also how can i import models to the game?

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [May 1, 2023, 10:29am UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/5 "2023-05-01T10:29:06Z")

</div>

> [@leon\_McCulloch](#):
>
> i have saved it and imported it into the play but when i play, there is an error

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.

> [@leon\_McCulloch](#):
>
> also how can i import models to the game

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

---

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 1:47pm UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/6 "2023-05-01T13:47:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [May 1, 2023, 1:59pm UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/7 "2023-05-01T13:59:31Z")

</div>

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

 ![IMG_3981](https://forum-files-playcanvas-com.s3.dualstack.eu-west-1.amazonaws.com/original/3X/c/7/c7ca31f9c9624f6f8f47b06d6e140960e51d7f46.png)

---

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 2:07pm UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/8 "2023-05-01T14:07:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leon\_McCulloch](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leon_mcculloch/32/26608_2.png) [@leon\_McCulloch](https://forum.playcanvas.com/u/leon_McCulloch)\
**Post date:** [May 1, 2023, 4:44pm UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/9 "2023-05-01T16:44:41Z")

</div>

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://playcanvas.com/editor/scene/1733144)  
[https://launch.playcanvas.com/1733144?debug=true](https://launch.playcanvas.com/1733144?debug=true)

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [May 1, 2023, 4:56pm UTC](https://forum.playcanvas.com/t/solved-my-script-doesn-t-work/30959/10 "2023-05-01T16:56:50Z")

</div>

> [@leon\_McCulloch](#):
>
> i have another problem

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

> [@leon\_McCulloch](#):
>
> when i launch my game, i cant see the walls that i have placed and i have refreshed it and nothing happens

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