I don't know how to make the UI tween from left to right depending on the value of "CurrentEnergy"
-- Energy --
local CurrentEnergy = char:WaitForChild("CharacterManagement"):WaitForChild("CharacterStats"):WaitForChild("Energy")
local MaxEnergy = char:WaitForChild("CharacterManagement"):WaitForChild("CharacterStats"):WaitForChild("MaxEnergy")
------------
CurrentEnergy:GetPropertyChangedSignal("Value"):Connect(function()
local healthChange = CurrentEnergy.Value/MaxEnergy.Value
healthGui.EnergyBarUI.MainEnergy.AnchorPoint = Vector2.new(0.5, 0.5)
healthGui.EnergyBarUI.MainEnergy:TweenSize(UDim2.new(healthChange,0,1,0),"In","Sine",0.05)
end)
This is what happens when I attempted to have the UI trying to go left to right: https://media.discordapp.net/attachments/833569929696509972/878152211182530570/BiggestFail.PNG

2 comments
@AlexanderYar I tried to do that, but it keeps disappearing to the left. I'm not sure on what to do.
I mightve misundersrood your question