You mean gradually? Try lerp:
Bar set width to lerp(self.width, 500*(Player.health/100), dt*2)
I know it's Construct 2, but I'm doing something similar with the bar (in Construct 3). I used the progress bar but apparently I can't customize it, so I've used a tilemap like suggested in the website.
Now I've found this and thankfully the lerp function is what I had in my mind, only logically speaking.
But it's not working well in my case.
The character drains energy graudally. There is a global variable called HealthBar with the value of 60. Each second, you lose 1 point, until it reaches 0.
I tried to make the function for the bar.
lerp(Self.Width, Self.Width(HealthBar/100), dt*2).
And I tried experimenting, changing variables etc, but it doesn't work well.
For example, when HealthBar reaches 0, the bar is still decreasing. You have to wait the HealthBar goes to -60 to see the bar empty.