Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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.

0
Yes but have you tried? WideSteal321 773 — 5y
0
@WideSteal321 why would you comment something so utterly useless. Of course I've tried. dominoplayer6 -15 — 5y

1 answer

Log in to vote
0
Answered by
ABK2017 406 Moderation Voter
5 years ago

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
0
The question literally says 'how do I get ALL OF THE MEMBERS in a group', not all roles. dominoplayer6 -15 — 5y
Ad

Answer this question