So I have this script and right now if you are even in the group you can become any rank if you click this gui.
I would like to be able to have it so you have to be in the group and a certain rank for example if you are rank number 14 and the name of the rank is millitary, you click the gui millitary button you can become that rank. But if you are rank 2 and click it nothing happens.
Here is the script I have I just need it configured for the ranks.
function Click(mouse) if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(1138896) then --Replace '000000' with your Groups ID. script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Deep blue") --Change this to whatever Team Colour the DEFENDING Team is. Get Caps right. end end
script.Parent.MouseButton1Click:connect(Click)
Haven't tested this script, but I think it should work.
function Click(mouse) local Rank = script.Parent.Parent.Parent.Parent.Parent:GetRoleInGroup(1138896) if Rank == 14 then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Deep blue") end end script.Parent.MouseButton1Click:connect(Click)