for i, creature in pairs(creatureArray)
When looping through a table or dictionary, it returns a key/value pair. The i is considered the key, and the creature is considered the value.
Here's an example:
local t = {
["Item"] = "Value",
["Another Item"] = "Another Value",
}
for i, value in pairs(t) do
print(i, value)
end
The output would be:
Item Value
Another Item Another Value