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

Certain Group Rank Teams?

Asked by 8 years ago

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

Log in to vote
0
Answered by 8 years ago

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.

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."? DerpzGamez 6 — 8y
Ad
Log in to vote
0
Answered by 6 years ago

Where Do We Put The Script?

Answer this question