I was wondering if it is better off to use a repeat loop or tweenservice to decrease a numeric value?
function GameEngine.ChangeCD(Player: Player?, CD: IntValue?)
if Player:FindFirstChild("CD") then
CD.Value = 2
coroutine.wrap(function()
if CD.Value >= 0 then
repeat
task.wait(0.6)
CD.Value -= 1
until CD.Value <= 0
end
end)()
end
end
-- TweenService
game:GetService("TweenService"):Create(CD, TweenInfo.new(1.2), {Value = 0}):Play()