for i, v in pairs(script.Parent.Cooldowns:GetDescendants()) do
v.Changed:Connect(function(Change)
if Change.Value == v.MaxValue then
repeat
v.Value = v.Value - 1
task.wait(1)
until v.Value == 0
end
end)
end
✓ ANSWER ACCEPTED
Help with cooldown script? No errors in output, value doesn't change.
1 answer
✓ Accepted answer
for i, v in pairs(script.Parent.Cooldowns:GetDescendants()) do
v.Changed:Connect(function(Change)
if Change.Value == v.MaxValue then
v.Value = v.Value - 1
task.wait(1)
repeat
until v.Value == 0
end
end)
end
I think this is the right placement.
This discussion is preserved as it was. New answers, comments, and votes are closed.
