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

GUI GroupInfo What do I need to start of to make it work Help?

Asked by 7 years ago

basically u input a group id through the textbox and it shows group info on the text label if it is possible showing the leader would be nice too on the right u input the userid and it shows user information and it shows their rank in the group on the left. This is what I am trying to make: https://gyazo.com/110a91bea2048ba2f6c4c447a3574054

https://gyazo.com/68f03807f55b42441c972284cd0e8d24

If anyone can explain me how to do it or how to start on, or any tutorials or explains then thank you very much!

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

You can get group data via the :GetGroupInfoAsync() function. It includes the group ID, name and owner.

Here is an example on how to get the owner of a group;

local groupId = 377251
local groupInfo = game:GetService("GroupService"):GetGroupInfoAsync(groupId)

print(groupInfo.Owner.Name) -- Outputs owner name.

If you want to display user information about the group, you can use the :GetRankInGroup()and :GetRoleInGroup()

Here is an example on the two functions;

local groupId = 123

print(game.Players.Vecaxo:GetRankInGroup(groupId)) -- Outputs the name of the rank.

--[[
    255 is the number of the highest role set in group terms. It's the
    owner basically.
    Guests are 0.
--]]
if game.Players.Vecaxo:GetRoleInGroup(groupId)) < 255 then
    print('vecaxo is not the owner of the group 123')
end

SOURCES GetGroupInfoAsync() GetRoleInGroup() GetRankInGroup()

Ad

Answer this question