Health bar trouble

how can i make it so that you have a heath bar in the corner and when a bad guy sees you he runs at u and has a collision with you your life goes down!

Hi

the best way is, go to the tutorials/demo thread dowload some of the demos
and study/copy how people have done it

Bye