Hey guys can someone please help mw out here, How can I make it so if someone is a certain rank in my group it will team them a certain team in game, For example this is a army group and they are a rank power 227 or lower (E1) so in game they get ranked Basic Training but if they are rank power 238 or higher (E7) they get the team US Military but then if they match the requirements and are in their own group such as if they match the (Special Forces operator and they are in the Special forces group and they are in the main army group with a rank of (255) general how do I make it so it teams them Special Forces but if they have no division they are only in main group it teams them Army personnel. Can someone please help me if you can find a way because I cannot. Thank you all!
game:GetService("Players").PlayerAdded:Connect(function(Player) if Player:IsInGroup(GROUPIDHERE) then Player.TeamColor = BrickColor.new(BRICKCOLORHERE) else Player.TeamColor = BrickColor.new(BRICKCOLORHERE) end end)
In the code above we have an event that fires every time a player joins. Once they join we'll check if they are in the group, and if so we change their team to the one for your group. If not, we'll make them join the enemy team instead.
Change the "BRICKCOLORHERE" and "GROUPIDHERE" accordingly.