Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is it possible to get all members of a certain group using a script?

Hi, I'm currently trying to build a game to attract more members to my group (by having Shedletsky eat a bowl full of all the members or something strange like that.), and I was wondering, is it currently possible to get all members in a group? If not, how can I set up a server to do this for me?

Please don't mark this as a 'request', I'm not asking anybody to write code for me, simply give me some clearance.

2 comments

0

Yes but have you tried?

0

@WideSteal321 why would you comment something so utterly useless. Of course I've tried.

1 answer

Do a little research, this is literally from the Dev...but I think getgroupasync is what you’re looking for.

local groupId = 123456
local group = game:GetService("GroupService"):GetGroupInfoAsync(groupId)
 
print(group.Name .. " has the following roles:")
for _, role in ipairs(group.Roles) do
   print("Rank " .. role.Rank .. ": " .. role.Name)
end

1 comment

0

The question literally says 'how do I get ALL OF THE MEMBERS in a group', not all roles.

This discussion is preserved as it was. New answers, comments, and votes are closed.