|
| 07 Nov 2016 11:09 AM |
I need help with making a health bar. If the player has 0 - 100 (max)health then the gui has the right scale but if a player has more than 100 (max)health then it would't be right anymore! how do I make that the scale will always be UDim2.new(0, 0, 0.1, 0) or UDim2.new(1, 0, 0.1, 0) not bigger or smaller than that whatever the players health is. how do i make this right? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 07 Nov 2016 11:22 AM |
Are you serious
Use UDim2's lerp function and lerp from 0,0,0.1,0 to 1,0,0.1,0 with health/maxhealth as the alpha or use health/maxhealth for the X Scale |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2016 11:24 AM |
| Also learn more about lua before doing what you are as you keep spamming way too many posts including annoying duplicate posts |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2016 11:26 AM |
| yes but when the player has over 9000 health, i don't want the gui to go out of the screen. |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2016 11:27 AM |
It doesnt go off the screen child Do you have readin issues?
health/maxhealth
Go back to middle school to learn math 9000/9000 = 1 |
|
|
| Report Abuse |
|
|
| |
|