Hello there! How can I make a script where if the player joins the game it auto team him to a specific team.
Colour of the team: fossile team name: Outsiders
Hello there! How can I make a script where if the player joins the game it auto team him to a specific team.
Colour of the team: fossile team name: Outsiders
Your code would be
game.Players.PlayerAdded:Connect(function(plr)
plr.Team = game.Teams.Outsiders
plr:LoadCharacter()
end)
But also this isn’t a request site
You can use this code:
game.Players.PlayerAdded:Connect(function(p)
p.Team = game.Teams:WaitForChild("Outsiders")
end
For the future, this is to help people fix their code, not make the code.
This discussion is preserved as it was. New answers, comments, and votes are closed.
7 comments
im pretty sure you just have to do player.Team = TeamObject
so in your case it would be player.Team = game:GetService("Teams"):WaitForChild("Outsiders")
what about the team colour and the name how the script would know which team
nvm shoukd that be in serverscriptservices
oh, you could also just set both of the teams autoassignable to true and then itd be handled automatically
oh
thans it works