How to make hpbar move for enemies?

How to make HPbar move for enemies?
I made an enemy that can move. Made Hpbar using UI elements. Now I have a problem
I want to make my enemy into a prefab. If I do this, then canvas and hpbar itself should be child objects of the enemy. If I do this, then there is a problem
namely, when my enemy turns, the hpbar starts rotating with him. What should I do?
191724-2.png
191723-1.png

Hi @Urtay,

That’s supposed to be easy to fix, just rearrange hierarchy inside prefab :

(1) Make empty prefab GameObject (this will be whole prefab element)

(2) inside Make GameObject with enemy as first child so just Zobie Standard";

(3) atache as next child “Canvas” - so (3) is not child of (2), the are parallel…

So when you will move (change position will work with (1), and when rotate will work with(2)…) Nothing fancy but supposed to be enough…