I've made this script
function assignTeam(player, groupId, teamName) if (player:IsInGroup(groupId) == true) then local team = game:GetService("Teams") if (team ~= nil) then local team2 = team:FindFirstChild(teamName) if (team2 ~= nil) then if (player.Parent ~= nil) then player.TeamColor = team2.TeamColor end end end end end game.Players.PlayerAdded:connect(function(p) assignTeam(p, 2676831, "Croatians")
I wan't the script to first add the team "Croatians" and then put them into it, instead of just putting them in.
If you want to create a new team, write Instance.new("Team")
, set the Name and TeamColor, and parent it to Teams.