✓ Accepted answer
Mob.Health is just a number, e.g., 100.
100 doesn't change. Furthermore, numbers don't have properties. You can't ask for 100.blah because that doesn't make sense -- numbers don't "have" things. They just are.
ROBLOX decided which objects get to do what. .Changed isn't something "special" in Lua. It's just the name that a lot of objects give for an event that fires whenever something happens to them. Parts or Humanoids have it. Lua doesn't -- so numbers don't.
If you want to wait for the health to changed, you have to connect to Mob's Changed event. You get the name of the property that was changed:
Mob.Changed:connect(function(property)
if property == "Health" then
.....
There also happens to be a HealthChanged property on humanoids:
Mob.HealthChanged:connect(function(newhealth)
....
1 comment
Thanks ! Great Help!