I’m really not sure what you’re trying to achieve with that code. In the first block, you are create a new pc.Entity and assigning it to a local variable called entityCG3000. Then, you’re assigning the result of a call to findByName to a member variable with the same name. And then you’re disable that entity.
Then, you have a block that calls setInterval. The function fires an event called startLigthUp3 (note that you spelled ‘light’ wrong in the variable name but as long as you’re consistent, it’s not a huge problem). Then you’re setting this.entityCG3000 to the result of another call to findByName. Unless you appended .bind(this) to the function passed to setInterval, the value of this will not be the same as it is outside the scope of that function’s body.
Ultimately, the moral of the story here is that, if you want people to help you solve problems here, it definitely makes sense to post the link to a small reproducible scene that illustrates the full context.