I’ve followed other forum examples to perform similar tasks in my code, but for some reason it seems to refuse to follow suit when I attempt to access a boolean variable. I get access to the script by making the entity it is attached to an attribute of the other script: Buttons.attributes.add(‘manager’, {type: ‘entity’});, then try to access the boolean: this.bet = this.manager.script.gameManager.removedCoins;, and use it later when I need it: if(this.bet === true), but no matter how I try the value always comes back undefined.
Here is link to full code.
https://playcanvas.com/editor/code/529780?tabs=10829078,10800992,10830385,10859876,10827801,10799779,10799160