what i tried :
local friends = { }
game.Players.PlayerAdded:connect(function(plr)
local table2 = plr.UserId
im trying to make a table for the player's friends (they add in game, different from roblox)
right now i have it as one whole table. so everybody has the same friends. is this even possible?

7 comments
are you serious? why does roblox do that? xD its the same thing aint it?
No, this creates new tables as values. Your example is only one table.
its saying "10:55:43.608 - Workspace.FriendsDataStore:30: bad argument #1 to 'pairs' (table expected, got nil)" this is line 30: for key, value in pairs(friends[plr]) do
and i meant about "connect" > "Connect"
My guess is that you're using 'plr' in outside of the event, which obviously wouldn't work
i fixed it thanks :D
just had to move some stuff around a few lines. thanks for letting me know about connect also.