So my ui Artist mentioned with health going up and down the green part will stretch super weird and not work since the left side is an odd shape. This is to display player’s level in that gap.
Anyways I think I have an idea to to fix this. Instead of the green part being an odd shape it could just be a rectangle. Now you’re probably saying, oh but it’s gonna clip through? I have a solution though, and that’s using clip descendants. What I want to know is if clip descendants would work in this case? I heard it only works with specific things
.
task.wait(2.3) -- Depends of how long your game takes to load entirely
local Humanoid = game.Workspace[game.Players.LocalPlayer.Name].Humanoid
while task.wait() do
script.Parent.Frame.Frame.Size = UDim2.new(0.98*Humanoid.Health/Humanoid.MaxHealth,0,0.8,0) -- Obviously, change it to what you have.
end
Make sure that the player regenerates every second.
task.wait(2.3) -- Depends of how long your game takes to load entirely
local Humanoid = game.Workspace[game.Players.LocalPlayer.Name].Humanoid
while task.wait(1) do
Humanoid.Health = Humanoid.Health+(Humanoid.MaxHealth/100)
end