|
| 08 Aug 2017 05:08 PM |
I want it to make all members of a group join 'Black' Team, except if they are the first rank they will join 'Smoky grey' instead. There is also a third 'White' team which is autoassignable and is for people who are not in the group at all.
So far, someone gave me this but it doesnt seem to be working.
game.Players.PlayerAdded:connect(function(plyr)
if plyr:GetRankInGroup(ID) == 1 then
plyr.TeamColor = BrickColor.new("Smoky grey")
else plyr.TeamColor = BrickColor.new("Black")
end)
|
|
|
| Report Abuse |
|
|
|
| 08 Aug 2017 05:11 PM |
| (i copied a version where i hadnt put the ID in yet but it does have the ID in the main one thats not the issue lol) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2017 05:13 PM |
| wiki.roblox.com/index.php?title=Output |
|
|
| Report Abuse |
|
|
Prenup
|
  |
| Joined: 26 Dec 2015 |
| Total Posts: 1140 |
|
|
| 08 Aug 2017 05:15 PM |
game.Players.PlayerAdded:connect(function(plyr)
if plyr:GetRankInGroup(ID) == 1 then
plyr.TeamColor = BrickColor.new("Smoky grey")
else plyr.TeamColor = BrickColor.new("Black")
end
end) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2017 05:20 PM |
local GroupS = game:GetService("GroupService")
local groupId = 3392928 local groupInfo = GroupS:GetGroupInfoAsync(groupId)
local blackTeamMinRank = 7 local greyTeamMinRank = 1
game.Players.PlayerAdded:Connect(function(player) local rank = player:GetRankInGroup(groupId) local teamColor if rank >= blackTeamMinRank then teamColor = "Black" elseif rank >= greyTeamMinRank then teamColor = "Smoky grey" else teamColor = "White" end player.TeamColor = BrickColor.new(teamColor) end) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2017 05:41 PM |
| Thanks robama lol. it worked. |
|
|
| Report Abuse |
|
|