Have something happen when object is set active?

I was wondering if there was some way of having something happen through script when an object is enabled. For example, a health bar, which when disabled and enabled again, refills to full. The language I am using is c#.
Thanks if anyone can answer :confused:

Sorry, I couldn’t figure out the topic part :confused: