#why does the tween in the second part not work

1 messages · Page 1 of 1 (latest)

glass tundra
#
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

pseudo zephyr
#

Isn't the first argument suppose to be how much time u want to tween it?

pseudo zephyr
#

The fourth argument suppose to be how much time u need to tween it and u didn put inside

#

I think

glass tundra
glass tundra
#

nvm it only works sometimes