Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I start counting a wait() w/ decimals / Countdown?

Im making an attempt at making a value change to the amount of time that has been wait()ed already.

This was my attempt but it did not work at all how I expected

while wait(buffTime) do
	wait()
	currentTime = currentTime+.1
end

1 comment

0

Could you go into further depth? I don’t quite understand.

1 answer

Figured it out, I just used tick()

local timeSoFar = tick()
local currentTime = 0
delay(0,function()
	while true do wait()
		currentTime = tick()
		timeValue.Value = timeSoFar - currentTime --- update the value (current time)
	end
end)
wait(buffTime)
print(timeSoFar - currentTime) --- the time waited

This discussion is preserved as it was. New answers, comments, and votes are closed.