Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

can somebody explain this? > for i = 0, 100, 1 do (dont judge i have not used dis for a while)

somebody help it involves with an aiming script i copied from a tutoria;l and was curious abt it;

for i = 0, 100, 1 do wait()

end

1 answer

✓ Accepted answer

This loop means that the code enclosed will repeat 101 times (since 0 will be counted).

That is because in this loop you have an index ('i') set to 0, which will be incremented by 1 every time the loop runs, until it reaches 100.

So it will run once with i set to 0, then again with i set to 1, then with i set to 2, and so on until it reaches 100, ultimately running 101 times.

Hope that helps. If not, here is further documentation.

1 comment

0

ok thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.