I want to make a tweening health bar, so I did this and for some reason it keeps printing in the output "attempt to call a table value" on the line with the tween and I don't know why. How do I fix it?
1 | human.HealthChanged:Connect( function (d) |
2 | game:GetService( "TweenService" ):Create(script.Parent, TweenInfo( 0.1 ), { Size = UDim 2. new(d / human.MaxHealth, 0 , 1 , 0 ) } ):Play() |
3 | end ) |