The term “array” is not interchangeable with the terms “table” or “dictionary” - Arrays in lua MUST be numeric and have no gaps between element at index 1 all the way to index n.
Creating a table with numeric indexes that has gaps between those indexes and index 1 (e.g. UserIds as indexes) will make that table not replicate properly - It’s listed as a limitation in the documentation and is also why Replica:ArraySet()
prevents you from setting indexes beyond existing ones. Consider using a dictionary with numbers converted to strings as indexes if you run into this problem.
In any case, the built-in array modifiers exist purely for sanity purposes and can be entirely replaced by Replica:SetValue()
or Replica:Write()
.