how to repeat code on roblox lua code example
Example 1: repeating loop roblox
while true do
-- Your script here
-- Every loop needs a wait increment, or your game might crash
wait(1)
end
Example 2: roblox repeat until
repeat
spawnGoblin()
currentGoblinCount = currentGoblinCount + 1
print("Current goblin count: " .. currentGoblinCount)
until currentGoblinCount == 25