How can I make a script that prints a number and then constantly adds +1 to it?

I have been trying to make a script, that It’s starting number is 220524 and then I wanted the game to print 220524, 220525, 220526 etc. How can I make something like that?

local number = --put number
while task.wait(1) do
   number = number + 1
   print(number)
end
2 Likes
local number = 220524
while task.wait(1) do
number = number +1
print(number)
end

Added a wait so it doesn’t lag out. You can also use break to break the loop.

2 Likes

You should probably do your own research first before asking in the forum.

I am pretty sure that you could find the solution using a simple google search.

Notice that you could shorten this to:

nunber += 1
3 Likes