-- For K,V in table
for k,v in pairs(tbl) do
print(k)
print(v)
end
-- For i=0, num
for i=0, num do
print(i)
end
for startValue, EndValue, [increments] do
--code to execute
end
--The increments value is optional. If it isn't defined, it is assumed to be "1"
for <init>,<max/min value>, <increment> [default is 1]
do
statements
end
-- Example
for i=1, 5, 1
do
print(i)
end
--Output
1
2
3
4
5
for x = 0, 10, 1 do
print(x)
end
local t = {}
for index, value in ipairs(t) do
print(index, value)
end
local t = {}
for key, value in pairs(t) do
print(key, value)
end
while wait() do
while true do
-- Put what you want looped in here
-- Do mind that this doesn't work for roblox and for that you should be using the roblox devforum.
end