About width of HP bar.

Hi, GS dudes.
I made a monster's hp bar and made it decrese by 1 whenever the monster is attacked. But there are two problems.
First, the size of the bar is too big. Each mosnter has different hp, but the bar size must be same at first time.
Second, the moster's hp is decreased too quickly. I set up the hp is 15 and set up to decrease by 1 whenever it is hit. But the monster is dead when it is attacked only 3 times.
This is what I made as below. Monster's HP is set up as 15.
1. Monster
When the monster is attacked.
Interpolate.MonsterHP to game.MonsterHP-1 (Duration : 1, Function : Linear)
Attribute game.MonsterHP=0 -> Destroy
2. HP bar
HP width (Constrain Attribute)
self.size.width to game.MonsterHP*7
I made a monster's hp bar and made it decrese by 1 whenever the monster is attacked. But there are two problems.
First, the size of the bar is too big. Each mosnter has different hp, but the bar size must be same at first time.
Second, the moster's hp is decreased too quickly. I set up the hp is 15 and set up to decrease by 1 whenever it is hit. But the monster is dead when it is attacked only 3 times.
This is what I made as below. Monster's HP is set up as 15.
1. Monster
When the monster is attacked.
Interpolate.MonsterHP to game.MonsterHP-1 (Duration : 1, Function : Linear)
Attribute game.MonsterHP=0 -> Destroy
2. HP bar
HP width (Constrain Attribute)
self.size.width to game.MonsterHP*7
Answers
(MonsterHP to: MonsterHP-1)
Even if this doesn't solve a problem, it's still better to use this method.
FM.