I was trying to make a Countdown function that counts down from one number to another,using two arguments,but it isn't doing that instead it just prints 1.Why and how do I fix it?
IsGame = false--Is there a game that has started? no GameModes= {"Tag","Run","Idk"} ------------------------------ function Countdown (NumberStart,NumberEnd) for i = NumberStart,NumberEnd do return i end end function StartMinigame() local Count = Countdown(1,10) print(Count) end StartMinigame()
I see, it only counts down once try this
function countdown(starttime, endtime) for i = starttime, endtime do wait(1) print(i) end end
It doesnt need to be returned.