Copied scripts not working

I am starting a new project and have simply copied a script from a project where it works to a new project.
The object is a rigid dynamic object with collision. However when I add the script to the object it doesn’t move. Its as if the program doesn’t read the script. Any ideas? Sometimes I get an error. (Script isn’t defined or Script failed to load) but I can’t figure out what’s different between the working project and the non-working one.

Working project
https://playcanvas.com/editor/scene/581399

Non-Working project
https://playcanvas.com/editor/scene/584848

Looks like you haven’t saved the file in the code editor?

usually coping code from someone else’s work doesn’t really work.

I understand that copying someone else’s code won’t work if they have references to tags, unique variables, etc, but this is an incredibly simple script that only makes something rotate.

Ahh. I thought it autosaved like the project editor. I was hoping it was something simple like that.

1 Like