Here is the script so far
while script.Value.Value > 0 do wait(.1) script.Value.Value = script.Value.Value - 1 val = script.Value.Value end script.Value.Changed:connect(function(change) script.Parent.Size = UDim2.new(0, val, 0, 25) end)
So if I am thinking correctly about what you are doing, I believe you want the gui to shrink with the hunger and such? So if it's at 50% the bar will be at 50% also? If so here is how I would do it.
The gui is just a frame in a screengui, it just acts as a sort of background for the meter.
local gui=script.Parent local bar=script.Parent.bar local value= script.Parent.Value while true do wait() bar.Size=UDim2.new(value.Value *0.01, 0, 1, 0)--makes it the size in percent of the number the hunger is at, it makes the height the same as 'gui'. end
I'm afraid I don't understand what's the problem here. Could you explain in a bit more detail?