V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
|
| 02 Mar 2014 09:07 PM |
local plr = game.Players.LocalPlayer.Character
while wait() do health = plr.Humanoid.Health bar = script.Parent bar.Size = UDim2.new(0, health*2, 1, 0) -- bar.Size would = UDim2.new(0, 180, 1, 0) end
After the player dies, it wont work any more, why not? |
|
|
| Report Abuse |
|
|
V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
| |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2014 09:11 PM |
Because the character resets after death.
~ Non simpliciter Latinam legere ~ |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2014 09:17 PM |
game.Players.ChildAdded:connect(function(p)
while wait() do health = p.Humanoid.Health bar = script.Parent bar.Size = UDim2.new(0, health*2, 1, 0) -- bar.Size would = UDim2.new(0, 180, 1, 0) end end) |
|
|
| Report Abuse |
|
|