Yarn - nameTag error "Cannot read properties of undefined (reading 'vertices')"

Hi there, this is my first time using this forum so apologies in advance if I miss anything.
In my game, I’ve followed this tutorial for two games now, and it’s served me very well up until this point!

The issue I’m coming across is that once the nameTag has to change animations, the game crashes. I genuinely don’t know why this is happening, and the issue disappears if I change the nameTag to a specific animation, or I set it to << nameTag none >>, but that’s not very helpful, seeing as I don’t want everybody in my game to be a librarian.

As you can see, the only thing I’ve changed here is the title of the nameTag but then these two different things happen depending on which one I call. With one, I get a huge error message.

The error itself says “Cannot read properties of undefined (reading ‘vertices’)” but despite looking up what that means, I still have no idea why it’s happening.

I’ve found that if I don’t have to switch characters, this doesn’t happen, but say I have a dialogue sequence that goes

Character A: hi
Character B: hi!
Character A: ok bye

The second time that the nameTag for Character A is called, this error happens… so it’s not an issue of being able to retrieve the nameTag, as the program has already done so before. I guess that’s why I’m so confused.

This isn’t just for this scene, either, it’s happening throughout the game if multiple characters are called upon!
Thanks in advance, let me know if you need any more context!

Realize I’m late to the party here, but in case anyone else ever runs into this issue, I can at least break down the problem a little more and try to explain why it MIGHT happen and how to sort of get around it. I’ve been unable to adequately reproduce the problem though, so I think this is just an annoying bug through and through.

At least in my case, it seems to have everything to do with default collision masks interacting strangely with custom collision masks during collision, changing an animation, or when moving.

The default collision masks are created when you first make the object, and they take up the whole sprite. You could click “Use a custom collision mask” to keep the same proportions or alter the shape.

I would always recommend using a CUSTOM collision mask for every different animation, even if it’s the same shape/size as the default.
Don’t let the game switch back and forth between default masks and custom masks. Either leave them all at default or make them all custom.

Deleting all the collision masks of the sprite is another way to nuke the problem entirely if you’re just sick of seeing it.