am trying to make a UI show only if a play is special Role in the group but I dont know how GetRankInGroup() work can someone explane
So :GetRankInGroup() is getting a rank number. So if you go into a group, and click onto a rank, It would have a rank number. That is what :GetRankInGroup() is getting.
local groupID = "Your groupID would go here" game.Players.PlayerAdded:Connect(function(player) if player:GetRankInGroup(groupID) => 5 then --If the players rank number is above 5, it runs code here. end end)
So if the players rank number in the group is equal to or above 5, then it executes the code in the If statement.
If you want to get the role in the group, you can use :GetRoleInGroup(groupID)
I hope this helps you out. If you're still stuck. Comment on this or this [http://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup]
To Use GetRankInGroup() You Would Have To Have Something To Change For It Like A Text Or Value, For Example:
script.Parent.Text = plr:GetRankInGroup(RankID)
The Text Would Change To There Rank name In The Group With The GroupID You Can Also Use It As A IF Statement
if plr:GetRankInGroup(RankID) == "Rank" then