Yes, Iām trying to auto-generate the DataStore data using any IDs in my modulescript, to avoid having to edit too many things every time I add an additional item ID. The IDs in the modulescript have different values assosciated with them.
You could add the values within IDs to id by using the table.insert method.
local IDs = require(game.ReplicatedStorage.IDs)
local id = {}
for _, v in ipairs(IDs) do
table.insert(id, v)
end
I hope this helped.
EDIT
Just saw the last sentence. You could set the index in id to the value in IDs.
local IDs = require(game.ReplicatedStorage.IDs)
local id = {}
for i, v in next, IDs do
id[i] = v -- Say `i` was 1111 and `v` was 5, `1111` would be added to `id` as an index to `5`
end