Model wont follow gun

Hi all.

I have a animated model downloaded from Unity Asset Store and I’m trying to add a muzzle flash on it that gets activated when enemy shoots.

Well everything is working fine so far, until enemy shoots. Muzzle flash stays on where it is put on and wont follow the gun.

Muzzle flash is a child of a gun.

Heres picture that hopefully clears what I mean.

86949-index.png

That green muzzle flash circled by red should be in the pipe of gun and not in the ground.

Any ideas how to fix it so it would follow gun?

[EDIT]
Muzzle flash is a small triangle model using particles shader, not an animation.

Anyways I fixed it by doing a code that changes it on position of empty gameObject positioned on barrel and then activates.

So the problem is now fixed, but I’d like to know what caused it to not move with the gun?