For Loops won't run while saving things to a data store?

Okay, if the object being saved is an IntValue then do this instead:

for index, value in pairs(Tooldata) do
    if DataFolder:FindFirstChild(index .. "_Id") then
       DataFolder[index.."_Id"].Value = value.Value
    end
end

(Keep in mind that when you save objects, everything in the object is saved (including children and descendants)

also for security, I would recommend using RemoteEvents to change the id number

But if the object is a Tool then create an IntValue as a child for it as reference for an id and set the DataFolder Object value to that value

1 Like