Hello everyone. I have this script, and it puts you on a certain team if you're in a group, and have the rank equal to or higher. As I am not the best at making scripts, I want to make sure my work is correct.
Here is the script below:
local ID = 737426
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if player:GetRankInGroup(ID) == 4 then
player.TeamColor = game.Teams["First Student"]
player:LoadCharacter()
else
player.TeamColor = game.Teams["Civilian"].TeamColor
player:LoadCharacter()
end
end
If anyone can answer, that would be much appreciated!

2 comments
As I am not at home and at school idk if this works
Lines 6 and 9's assignment is not consistent. Notice how in line 9 there's an additional '.TeamColor' versus the assignment in line 9.