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

How would I convert a group name to group ID?

So what im trying to do is check if a group name exists and if it doesnt then it prints the group name. I think I know how to do that but im just trying to see how I would get the id from the name.

1 answer

I'm not sure you can really check a group through it's name but you can however use GetGroupInfoAsync() in order to get most the groups info.

local groupId = 0 -- change this to your group id
local groupService = game:GetService('GroupService')
local group = groupService:GetGroupInfoAsync(groupId)

-- group is a dictionary full of all info

print(group.Owner.Name)
print(group.Name)

You can find out what data you can find through this link.

Hope this helps.

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