✓ Accepted answer
Hello! It seems your problem is with whether a variable is a global one or a local one.
A local variable can only be seen in the same "scope" (you can think of them as "towers"):
local x = 0
do
local x = 2
end
print(x)
However, global variables are different. It is like, sending someone to change the variable below.
local x = 0
do
x = 2
end
print(x)
There is a way more convenient way of doing the loop you've done in your code, however, they are practically the same? which is:
local start = 0
local finish = 30
local increment = 1
for index = start, finish, increment do
wait(0.5)
print(index)
end
Anyway, if you have any questions, fell free to ask me them.
2 comments
*also on a alt acc dont mind anything about this
Please, use a code block. It's literally like reading an encrypted note without deciphering it.