[SOLVED] My script doesn't work

i’m new at playcanvas so i watched tutorials… i did everything right in the code(that supposed to make a box move), but it didn’t work.
please help me to fix it :pray:
this is the code:

var Move = pc.createScript('move');

Move.prototype.initialize = function() {
    
};

Move.prototype.update = function(dt) {
    this.entity.translateLocal(0.1,0,0);
};
1 Like

Using your script I got the error:

playcanvas-stable.dbg.js:19498 Uncaught Error: script name: 'move' is reserved, please change script name
    at Object.createScript (playcanvas-stable.dbg.js:19498)
    at Move.js?id=8764598:1

Try adding the script with a different name “move1” worked for me.

HTH

2 Likes