Rexauro
|
  |
| Joined: 03 Mar 2008 |
| Total Posts: 8864 |
|
|
| 07 Jan 2014 03:36 PM |
1st PART
local max = script.Max.Changed local min = script.Min.Changed local hunger = script.Hunger local Player = game.Players.LocalPlayer local Charater = Player.Character
for i = hunger.Value, max.Value do max.Value = (i - hunger.Value) wait(.8) end
while true do script.Parent.Size.X.Offset = max.Value - hunger.Value end
if max.Value < 0 then hunger.Value = 0 for i = 1, Character.Humanoid.MaxHealth do Character.Humanoid.Health = math.random(1, 25) wait(.5) if Character.Humanoid.Health < 0 then Character:BreakJoints() end end end
2ND PART
local max = script.Parent.HungerScript.Max
while true do wait() script.Parent.Size = UDim2.new(0, max.Value, 0.649999976, 0) end
Can someone tell me why the bar isn't going down? |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 07 Jan 2014 03:43 PM |
Change
local max = script.Max.Changed local min = script.Min.Changed
To
local max = script.Max:findFirstChild("Changed") and the same for min |
|
|
| Report Abuse |
|
|
Rexauro
|
  |
| Joined: 03 Mar 2008 |
| Total Posts: 8864 |
|
| |
|
Rexauro
|
  |
| Joined: 03 Mar 2008 |
| Total Posts: 8864 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 07 Jan 2014 04:15 PM |
| You can't have a while true do loop and expect it to go onto another part. |
|
|
| Report Abuse |
|
|