roblox for code example
Example 1: how to do for loops roblox
--roblox forloop
for count = 1, 5 do
print(count)
end
Example 2: for loop roblox
for i,v in pairs() do
end
-- or
for i,v in next, do
end
Example 3: for i = 1 to n roblox
local n = 10
for i = 1, n do
print('monke god')
end
Example 4: roblox repeat until
repeat
spawnGoblin()
currentGoblinCount = currentGoblinCount + 1
print("Current goblin count: " .. currentGoblinCount)
until currentGoblinCount == 25