I have a question to ask if what im asking is possible. Im recreating cookie clicker. in it, it gives the illusion that you are earning tons of cookies instead of the cookies counter going up every second. is that possible to make that in roblox?
Example of what im trying to say. if you launch the cookie clicker game on the browser. and you get 2x click, which makes it so you can get 2 cookies when u click. it doesn't instantly update to 2, it quickly but slowly enough to go from 1, to 2, its a neat illusion and i want it to be in this one aswell. Of course when you're at like 100, its quickly enough that it can go up to 100 in a second.
use a for loop:
function updateNumber(finalNumber) local waitTime = 1/finalNumber -- figure out how long we have to wait per number to make sure the value gets changed to final number every second for i = 1, finalNumber do --TODO: change the numCookies text box to be the number 'i' wait(waitTime) end end updateNumber(100)
as Overscores said, the minimum wait() can be 1/30th of a second so any number smaller than that will be longer than a second.