I was wondering if it would cause problems to have a couple of for loops in a row which have to sort through about 50 items. Would I need to include a wait() in that scenario or will I be fine to leave it out?
✓ ANSWER ACCEPTED
When should I be including a wait() inside of a for loop?
1 answer
✓ Accepted answer
as long as there's a definite end, you shouldn't have to put a wait() in. for example, this loop would NEED a wait(),
while true do
wait()
end
while this doesn't:
local f = workspace:GetChildren()
for i = 1, #f do
f[i].Name = "chungus"
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Should be fine
What about with larger data sets? What would be a limit after which I should use wait()? I ask because I use a few crucial for loops that I don't want to error.