works for me, dont now what the problem is oO.
Anyways, you could also do it something like this:
and call godMode as a thread
self.maxhealth = 99999;
self.health = self.maxhealth
EDIT: sorry, didn't see the "SOLVED" mark...my bad