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

How do I connect a team spawn with a group rank?

How can I connect a spawn with a team? Like, how can I script it so that when a player joins if he's in the group and e. g. rank 2, he'll spawn as "Passenger", if he's rank 200 he'll spawn as "Management Director". Please help.

1 answer

✓ Accepted answer

I am not exactly sure what your variables are but I will give it my best shot.

local groupId = 2723362 --paste the id of the group in here--

local passenger = Instance.new("Team", game.Teams)

passenger.TeamColor = BrickColor.new("Really Red")

passenger.Name = "Passenger"

passenger.AutoAssignable = false

game.Players.PlayerAdded:Connect(function(player)

if player:IsInGroup(groupId) and player:GetRoleInGroup(groupId) = "Rank 2" then

player.TeamColor = BrickColor.new("Really Red")
 
end

in place where I put Passenger put your Team Name. in the rank section put your group rank you want it to be.

You can toggle the team color if you want and place spawns where you like.

3 comments

0

oh ty

0

Did this work?

0

if it did please mark it that I answered the question

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