Initialize function being stepped over

This script was working fine the other day, and now for some reason the initialize function isn’t being hit.

var RotateRing = pc.createScript('rotateRing');

var colliders;

// initialize code called once per entity
RotateRing.prototype.initialize = function() 
{
    colliders = this.app.root.findByTag('Collider');
    for(i=0;i<colliders.length;i++)
    {
        colliders[i].rigidbody.enabled = false;
    }
};

RotateRing.prototype.spin = function()
{
    for(i=0;i<colliders.length;i++)
    {
        if(colliders[i].rigidbody)
        {
            colliders[i].rigidbody.enabled = true;
        }
    
        colliders[i].rigidbody.applyTorque(0,50,0);
    }
    
    //this.entity.rigidbody.applyTorque(0,10.895,0);
};

The colliders array is not being set as a result, and this causes the spin function to return an error saying cannot read property length of undefined. The only difference between now and when this was working is the last line being commented out.

Whoops, found it. I disabled the entity the script was on.:grin: