local firebar = script.Parent
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChild("Humanoid")
humanoid.HealthChanged:Connect(function()
local maxfire = humanoid.MaxHealth
local fire = humanoid.Health
local newfirebarsize = UDim2.new(1, 0, fire/maxfire, 0)
firebar:TweenSize(newfirebarsize, Enum.EasingDirection.In, Enum.EasingStyle.Sine)
end)
humanoid.Died:Connect(function()
firebar:TweenSize(UDim2.new(1,0,0,0), Enum.EasingDirection.In, Enum.EasingStyle.Sine)
print("Dead")
end)
the print works but the tween doesnt
its under startergui
no errors