Well I couldnt get your code to run at all, the project wouldnt load because the icon is missing, so i created a new project from the source code, it still didnt run, are you using some dll plugins?
check this post out
http://forum.thegamecreators.com/?m=forum_view&t=149987&b=1
The source being discussed there does what you want,
these are the bits of code you want:
perform checklist for object limbs o_level
list=checklist quantity()
o_health = freeobject()
n_health = -1
for id=1 to (list-1)
if lower$(keyvalue$(limb name$(o_level,id),"classname",""))="health"
inc n_health
load object "health.x",o_health+n_health
scale object o_health+n_health,50,50,50
position object o_health+n_health,limb position x(o_level,id),limb position y(o_level,id),limb position z(o_level,id)
endif
next id
This isnt the full code but it highlights the part that does the job
Nothing to see here, move along please.