I am somewhat confused as to what to do here. I am trying to make the health bar scale to the right side of the frame instead of the left.
As of now the only thing I thought of was changing was the tweened UDIM2 to the following:
UDim2.new(Health, 0, -1, 0)
But even after attempting that it just made the frame become nothing.
local Player = game.Players.LocalPlayer
local Character = Player.Character
while task.wait(0.1) do
if Character then
break
end
end
local Bar = script.Parent.MainFrame.GameBars.Health.Bar.Health
local Humanoid = Character:FindFirstChildOfClass('Humanoid')
Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
local Health = (Humanoid.Health / Humanoid.MaxHealth)
Bar:TweenSize(UDim2.new(Health, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.15, true)
end)
Anyway, if anyone can help me with this, it would be greatly appreciated.