How to make the text gui updates every 1 second

Ive been trying to make a simulator but when the int value changed(in game) then
the text gui didnt updates the invalue value every time.

Heres the script :
local active = false

if active == false then
active = true
if active == true then
local capacity = script.Parent.Value
local used = script.Parent.Value2
script.Parent.Text = (used.Value …"/" …capacity.Value)
end
end

value.Changed:Connect(function() script.Parent.Text = value.Value end)

3 Likes