How would I make a certain rank able to click a gui

So there is 2 teams, I got a team changer and its “Rebels” and “Red Army” So when I join the game, I have a normal rank for team choosing(which is fine) so what I wanna do is
if you are in the group and you are the “Red Army” rank. then you are able to choose you the red army team, nothing else. now if you’re like a normal rank (lowest rank) and you aren’t the “Red Army” rank then you can’t become that team (using guis)

Just make a variable which makes the Normal Rank team won’t able to view the GUI/Frame, by using this, Must use local script

local Player = game.Players.LocalPlayers
local Gui = --Your gui here

if Player.Team.TeamColor == BrickColor.new("White") then --Change the white color to Normal rank's team color
 Gui.Enable = false
else 
 Gui.Enable = true
end
2 Likes

This is quite not what I was looking for.

Do you mean the Actual Roblox Group?

If so, you can use the :GetRankInGroup()

--Example Code

--If the code is in localscipt
local Players = game:GetService("Players")
local thisPlayer = Players.Localplayer
local sampleGroupID = 1234567890 --This is the Group ID of the actual Roblox group
local RED_ARMY = 2 --This is the value of rank value in the actual Roblox group

if thisPlayer:GetRankInGroup(sampleGroupID) == RED_ARMY then
    --Your logic code here.
else
 --This player is not a RED_ARMY or not in the Roblox Group.
end

If you have more questions feel free to reply.

1 Like

Thanks everyone for the help but I got some help and figured it out