How would I get a variable’s value from another script and transfer its value to a new script?
You can do this by:
- Getting a reference to the entity this script instance is attached to
- Referencing the script component and the script instance like this:
var value = this.app.root.findByName('myEntity').script.myScriptName.myPropertyName;
This way you can get the value from one script property, and in the same manner set it to another.