I’m currently following a tutorial to learn scripts, and this problem suddenly popped up and I don’t understand why, I tried to look for the solution in the forum but I don’t understand the problem…
the other day it was with a scripter (with a good level) who didn’t know how to correct it
Dictionaries and Arrays worked the same for many years, that’s a faulty tutorial.
using pairs() is quite unnecessary nowadays, as Luau now automatically handles that internally. Just using for tool, toolTable in toolConfig do would be enough.
That warning is pretty recent I think. I believe it came with the lua type checking stuff, now that it is able to determine the types of a table (having string indexes, rather than number indexes), it is able to throw a warning when you try to use ipairs on a table that doesn’t have number indexes
Luau can’t loop over a string or other types of indexes (keys), only with number indexes it is able to find the value. Because a string can be anything wheres a number is a number. Otherwise, Dictionaries and Arrays are pretty much the same.