So I have a table in a local script and i pass the table to a server script to save it
local script:
--this is how im passing the table to a server
remoteSaving:FireServer(table)
the table when i tested only had one value inside of it
server script (saving data):
remoteSaving.OnServerEvent:Connect(function(pl, table)
Items = table
ds1:SetAsync(pl.UserId, Items)
print("saved data for"..pl.Name)
end)
then when a player joins i use PlayerAdded event to call a function for getting data, also in the same server script:
game.Players.PlayerAdded:Connect(function(pla)
Items = ds1:GetAsync(pla.UserId) or {}
remoteSaving:FireClient(pla, Items)
end)
and when I fire client with that table it crashes because my for loop where i go through the table acts like it has infinite amount of values in it
Anyone knows what im doing wrong?
