badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 29 May 2016 06:52 AM |
for my game, the tanks need health bars, which are displayed on a GUI.
everything works fine but I need to health bars to resize from the left to right (like this: https://twitter.com/DucktorCid/status/736887584606040064 )
but the tank on the right resizes from right to left (like this: https://twitter.com/DucktorCid/status/736887654759997440 )
to fix this, i've tried placing the bar to the right by the amount of health taken off already (or atleast that's what i think this line of code is doing):
bar.Position = UDim2.new((100-val)/100,0,0,0)
(100 being the maxHealth of the tank, val being the current health)
but it doesn't work (bar comes off the side of the backing etc).
Can anyone help me fix this?
Every time I die, I hope they're digging at my grave! |
|
|
| Report Abuse |
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 29 May 2016 07:14 AM |
b
Every time I die, I hope they're digging at my grave! |
|
|
| Report Abuse |
|