Im currently making a vertical hunger bar. And its not going as planned because the bar decreases vertically. can anyone help?
local Player = game.Players.LocalPlayer
local Hunger = Player:WaitForChild("Hunger")
local GUI = script.Parent.Parent
local HungerBar = GUI.BehindHunger.Hunger
local function UpdateHunger()
-- Update the hunger bar size
local CurrentValue = Hunger.Value
local Formula = math.clamp(CurrentValue/100, 0, 1)
HungerBar:TweenSize(UDim2.new(Formula, 0, 1),Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.15, true)
end
UpdateHunger()
Hunger.Changed:Connect(function()
UpdateHunger() -- Call the function here
end)
this is thebar the orange is the food bar and the dark blue is the back of the bar