no error btw
COMMUNITY QUESTION
Trying to print a list of groups for everyone that joins the server?
1 answer
userId should be UserId
local Players = game:GetService("Players")
local groupsIn = {}
game.Players.PlayerAdded:connect(function(player)
local pages = game:GetService("GroupService"):GetGroupsAsync(player.UserId)
while true do
for _, group in pairs(pages:GetCurrentPages()) do
table.insert(groupsIn, group)
end
if pages.IsFinished then
break
end
pages:AdvanceToNextPageAsync()
end
print(groupsIn)
end)
Wiki Links:
if you need any furture help please reply to this!
1 comment
0
same result
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Put your code in code blocks within your questions. No need to provide any off-site links for it.
line 5 player.userId should be player.UserId -- capital U