Disable an entity through a different scene

Hey i was wondering if i would have to make a whole new script to disable this entity when the new scene loads since the other entitys doesnt follow but this one. here is my code for the menu:

var changeScene = pc.createScript('changeScene');

changeScene.attributes.add('Entity', {
                           type: 'entity'
// Creates a new Scene instance
changeScene.prototype.initialize = function () {
    // initialize current root to first scene loaded
    //this.enabled = 'attr:entity';
    //this.enabled = false;
    this.currentRoot = this.app.getSceneUrl();
    this.currentLevel = 0;
    this.levels = [

changeScene.prototype.update = function (dt) {
    if (this.app.keyboard.wasPressed(pc.KEY_ENTER)) {

changeScene.prototype.loadLevel = function(level) {
    // destroy the current scene
    if (this.currentRoot) {

    this.app.loadSceneHierarchy(this.levels[level]+'.json', function(err, entity) {

changeScene.prototype.nextLevel = function() {
    this.loadLevel((this.currentLevel + 1) % this.levels.length);

But when i load into the new scene the play buttton along with the text follows along… I am trying to figure this out by using this.enabled but when i do so it wont load stays stuck on starting screen…

 this.enabled = 'attr:entity';
    this.enabled = false;

If anyone knows what could be done i would greatlly appreciate it.

Nathan Hawkins

As mentioned in a different thread of yours, scene loads are additive. This means that when you load a new scene, it gets added to the existing scene. This is why the examples for ‘switching’ scenes keep a reference to the ‘Root’ entity of the current hierarchy before loading the scene and destroying after the new scene has finished loading.