while loops 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: while in lua

while(condition)
do
   statement(s)
end

Example 3: loop in lua

-- a loop will repeat the code for a limited amount of time
-- let make one
for a = 1 --(from where you want it to start),10 --(how long you want it to be),1 --[How many jumps it needs to make(ex 2, 4, 6, 8,10)]
	print(a) -- now it will count to 10
end

Tags:

C Example