loops in lua code example
Example 1: lua while loops
--// Basic while true do loop
while true do
--// Looped text
print("Looped Text")
--// Time the loop waits before looping again
wait(1)
end
Example 2: lua how to make a loop
for init,max/min value, increment
do
statement(s)
end
Example 3: For loop lua
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"