Essentially my healthbar goes 1 pixel off when I set my health back to 100. I just do: health = 50 resizes to 101 health = 100 resizes to 199
What the heck?
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health,false)
local plr = game.Players.LocalPlayer
local rs = game:GetService("RunService").RenderStepped
local quad = Enum.EasingStyle.Quad
local out = Enum.EasingDirection.Out
while plr.Character.Humanoid.Health >= 0 do
local health = plr.Character.Humanoid.Health
if plr.Character:FindFirstChild("Health") then
plr.Character.Health:Destroy()
end
script.Parent.Background.Health:TweenSize(UDim2.new(0,health*2,0,5),out,quad,0.4,true)
wait(0.1)
end
I tried using math.ceil/math.floor to fix the problem but it did absolutely nothing.

5 comments
Use this instead of a "while" loop http://wiki.roblox.com/index.php?title=API:Class/Humanoid/HealthChanged
What's the GUI object "Health's" size values?
Your problem is line 13; You are looping the Player's Health but also Multiplying the health by 2 (100 * 2 = 200, 50 * 2 = 100, ect.), but, instead of that, why not Divide the Current Health by it's MaxHealth? :P
that is because the background/health is 200 pixels long
I'm sorry I can't test it, I don't have ROBLOX Studio installed on the device I am writing this on. Either you accept that I tried or I won't help you anymore.