#Why does intvalue not work when changed

3 messages · Page 1 of 1 (latest)

vernal osprey
#

I want it to work where if changed then the text will changed and go down like a health bar on a part, but it does not.

local frame = script.Parent
local measure = frame.Measure
local label = frame.LabelText
local Health = script.Parent.Parent.Parent.Health

label.Text =  Health.Value .. "/" .. Health.Value

measure.Size = UDim2.new()
foggy pilot
#

You gotta listen to value changes

#
Health.Changed:Connect(function(newValue)
    label.Text = newValue.."/"..10
    measure.Size = UDim2.fromScale(10 / newValue, 1)
end)```