[SOLVED]Having Problems With .getLocalScale();

Ok so i was deciding to go and kinda work on my tutorial some more and when i went in the editor and launched (Mind you i havent been in this project for a while so the scripts are untouched) and when i launched it the console read an error in this line:

    var scale = new pc.Vec3().copy(this.healthEntity.getLocalScale()); 

says it cannot read property of null now for some reason this has happened before but i fixed it and now it doing it again and there is nothing wrong with it. Also i tried to locate it on update function and initialization function and both times reads same error message.
Here is link to editor
Here is link to code

If someone knows why this happens please let me know :100:

Can you post the specific error you are getting, and a step-by-step instruction on how to reproduce it.

1 Like

Sorry i fixed it now i realized i was calling on it twice