[SOLVED] Not a function error

Hi, why do i get this error in this line?

this.rhand = other.findByName(data.mod).model.findByName('Bip01 D Mano');

What is the exact error @ayrin? It will contain the name of the method most likely.

Probably because a Model Component doesn’t have a .findByName() method. I think you want:

other.findByName(data.mod).findByName('Bip01 D Mano');

not a function network
tried that too LeXXik didn’t work either.

Although in your way it doesn’t show errors LeXXik, but the sword is not shown in hand either, before trying to reparent it the sword is shown between the legs, after reparent it disappear

It doesn’t show the error, because it is the right way to do it :slight_smile:
The sword missing on reparent is a different issue. Make sure the positions of the parent and child are correct after reparenting. Also, make sure the parent and child are enabled.

Yes @LeXXik they are both enbaled, i have a dubt about the scale is the object scaled after being parented?

The child will take its current own scale (ignoring the current parent scale) and multiply by the new parent scale.

1 Like

Got it after rescaling it works
test weapon

3 Likes