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

how do i use a while loop to count numbers?

I have

local number = 0 while true do number = + 1 end

everytime i do it it erros alot and crashes

1 comment

0

try this

3 answers

✓ Accepted answer
local number = 0

while true do
	wait() 
	number = number + 1
	print(number) 
end

Thisll print what number you are on along with increasing it.

local number = 0
while true do
wait(0.01)
number = number +1
end

2 comments

0

i canot see the number

0

that is because it is not printing it

local number = 0 --It stats with 0 of course

While wait(1) do -- you can change wait(1) to any number in seconds
number = number + 1
end

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