☑ Appear or not appear this is the problem

Hello, i have a simple yet annoying problem, if i equip the shield in my project it works fine, i unequip it and works, i equip it again and doesn’t appear the model, i do it again and works again…so 1 time it works and 1 time doesn’t. I’m loosing my sanity to find the problem but can’t see it. Anyone can help solve it?
Player.js line 293 equip_shield function - line 1237 and follows equip shield check

Found out the problem i have put the resize code in equip code so that make the shield appear and diappear. I have done that coz at first i had just 1 shield model now that i have 2 i needed to resize both. Since it don’t work properly i thought of resize both in the inizialize function like this

            this.shield=this.entity.findByName("Small shield");
            var scale = this.shield.getWorldTransform().getScale();
            this.shield.setLocalScale(0.5*scale.x, 0.5*scale.y, 0.5*scale.z);
            this.lhand = this.model.findByName('Bip01 I Mano');
            var scale = this.shield.getWorldTransform().getScale();
            this.shield.setLocalScale(0.5/scale.x, 0.5/scale.y, 0.5/scale.z);

first lines are for the unused model at start, second part work fine, but the first…don’t work…any idea how i can solve this?

Why do you scale it? And what does someone need to do to equip/unequip the shield?

I scale it coz it’s not showed elsewhere…don’t ask me why…the equip function attach the model to the bone and enable it, the unequip function disable it (this for several different models one for every kind of shield in this case)
EDIT: the model is already a child of the main entity but if i scale it from editor for some reason don’t work so i have to scale it from code to use it correctly (found that method somewhere on forum or in answers)

Erm… I’m still not clear on what the issue actually is anymore or how to reproduce it in game?

oh if you meant what you have to do to equip it in game you just have to open the inventory (backpack icon or i key) and click on the equipped item to unequip or click on the unequipped ones to equip it
EDIT: the item that give the trouble is the shield on the ground in front of player you click on it to pick it up and open the inventory to equip it

Looked at the project and it was a scaling issue problem from attaching the entity to a bone.

Thanks a lot @steven