Script
for i,v in pairs(game.Workspace.Teleports:GetChildren()) do local dss = game:GetService("DataStoreService") local sv = dss:GetDataStore("Save1") game.Players.PlayerAdded:Connect(function(plr) local SetSuccess, errormessage = pcall(function() local PortalData = sv:SetAsync(plr.UserId,v) end) if not SetSuccess then warn(errormessage) local GetSuccess, amount = pcall(function() return sv:GetAsync(plr.UserId) end) if GetSuccess then print(amount) end end end) end
You should first know what you can save inside a data store, you cannot save an instance inside of it. Instead I'd recommend saving it's name(string), and getting the instance from a table or use your own ways. Also, I'd recommend don't making many data stores, just make one, and save each value with a different key using only one data store.