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

Certain Group Rank Teams?

So I'm trying to make a game and I'm confused.

How do I make certain ranks in my group get placed in a SPECIFIC team? (e.g: Rank 255 AKA myself would be put in a team for the leader only)

I'm wondering if this could be done through a script, any help would be appreciated greatly.

2 answers

✓ Accepted answer

The thing you're looking for is the GetRankInGroup Method. Basically, you use this, and transfer it over to putting it on teams. In the end, here's what you would do. I've made it easier to understand, and easy to use.

Group = 0 -- Put your Group id; https://www.roblox.com/My/Groups.aspx?gid=####.

function Added(plr) -- Uses the player for the function.
	if plr:GetRankInGroup(Group) == 255 then -- If player is leader, then...
        plr.TeamColor = BrickColor.Yellow() -- Puts player in the team.
    end -- Stop the if statement.
end -- Stop the function.

game.Players.PlayerAdded:connect(Added) -- When a player joins, take note, then fire the function.

If this helped, make sure to accept my answer.

1 comment

0

I still have some questions, is it possible to have multiples of this code in the same script for different ranks? And would it work if I put "Really red" after "BrickColor."?

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