How do you save a health bar?

Hello, I wanted to know how to save a health bar. I have no idea how it works without a global variable. thanks in advance

Screenshot 2024-06-26 180101

You could set some global variable to value of bar before you save
Then you would need to set value of bar to that global variable after you load