Health Bar Help

I need to know how I would make a health bar using java script that would go down every time you take damage, and when the health bar is empty your player turns into another prefab or ragdoll.

Your question is very general, so I’m assuming your new to unity/programming. So I recommend you watch some video tutorials about programming and unity first. I recommend watching the tornado twins, although they aren’t good at teaching you programming, they are very good at showing you around unity and how it works.

The Tornado Twins:

Here’s a video about programming that helped me out:

Good luck!

See the following excellent tutorial. It describes how to make a “fuel bar” which is functionally the same process you would use to make a “health bar”.

http://cgcookie.com/unity/2012/04/23/lunar-lander-06-music-persistant-data/