Hi,
In this tutorial i will be guiding you through, how to how to add a certain player to a team.
The first thing you need to do is make sure you have a team ready and that AutoAssignable is set to false.
Now that you have the team and have AutoAssignable set to false we can now start scripting.
First off we should start by creating a variable.
local customRole = game.Teams.CustomRole
Change CustomRole to the name of your team that you are assigning to a certain player.
Now that we have created a variable we can now define the player.
game.Players.PlayerAdded:Connect(function(player)
if player.Name == "" then
Be sure to add the players name that you are assigning this team to, inside the speech marks.
Now that we have defined the player we can now assign them to the team.
player.Team = customTeam
Once you’ve finished your script should look like this
Thank you for reading my post, I hope it helped and have a great day!