I created a function that counts down from argument to another then uses the wait method to wait until it's complete,but it won't continue with thread once its done.Why and how do I manage to fix it?
function Countdown(StartTime,EndTime)
-------------------------------------
local Library = assert(LoadLibrary("RbxUtility"))
local Signal = Library.CreateSignal()
-------------------------------------
for i = StartTime,EndTime do
print(i)
if i == EndTime then
Signal:fire()
return Signal:wait()
end
end
end
Countdown(1,10)
print('Countdown Finished')
print('yay')
