Without the capx or screen grabs we will only be guessing - but if you are doing what I think you are doing it will be something like
pick up health potion
add to health the value of the health potion
set width of health sprite to health
close ?
in which case you just need to check if health is now bigger than maximum health and if so make health equal maximum health
look at "clamp"
https://www.scirra.com/manual/126/system-expressions