Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I fix "for and do loop ending with until"?

Asked by 3 years ago
Edited 3 years ago

``Hello, I am very new to scripting, so thanks very much for help. I tried to make script to collect Crops number from 0 to 115. After it reaches max - 115, whole loop resets and it wait 1 minute and after it starts collecting from number 0 again. I tried everything, but always I get syntax error and I don't know what to do anymore. Even google didn't help. Thank you very much. PS: I know it is simple and noob script, but I am scripting only 2 days. Thank you.

for count = 0, 115 do
local max = 115
local string_1 = "ClaimCrop";
local number_1 = count
local Target = game:GetService("Players").BeautifulAuraLover.Function;
Target:InvokeServer(string_1, number_1);
until max then
wait(60)
return count
end

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

repeat until is the correct loop variant not for do

local count = 0
repeat count = count + 1 
until 
count = 115 
end
Ad

Answer this question