Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 22 Jan 2014 12:46 PM |
What I'm trying to do is move the health bar out of the frame to achieve the dropping health. It's working but instead it takes a huge chunk of the health and then change little by little. It's hard for me to explain... There is a more effective way of doing this probably, but I'll stick with this for now. Any ideas?
function BarUpdate() local length = status.HealthBar.Size.X.Scale local maxh = sei.Max.Value local perc = sei.Value/maxh local offs = (1-(perc*length))-1 status.HealthBar.HealthBar.Position = UDim2.new(offs,0,0,0) end |
|
|
| Report Abuse |
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 22 Jan 2014 12:57 PM |
| Nevermind, I found a better way. Thanks to those who read my post. |
|
|
| Report Abuse |
|
|
| 22 Jan 2014 01:01 PM |
May I just point out:
(1-(perc*length))-1
is the same as
-perc*length |
|
|
| Report Abuse |
|