How to put player on a specific team when joining

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? When a player joins the game their team is “Neutral” by default.

  2. What is the issue? My script for it just isn’t working.

  3. What solutions have you tried so far? I looked on the hub for help and none of it worked\confusing.

-- 

local Players = game:GetService("Players")
local Teams = game:GetService("Teams")

local teamNeutral = Teams.Neutral

local function play(player)
	player.Team = teamNeutral
	player.TeamColor = teamNeutral.TeamColor
	
	player:LoadCharacter()
end

game.Players.PlayerAdded:Connect(function(plr)
	play()
end)
2 Likes

you need to replace this with play(plr)

Still didn’t work. (30 chhhhh)

did you check the output for any errors?

1 Like

I found out what it was. Neutral wasn’t a member of Teams because I forgot I had it as “Team Neutral”. Thanks man.

2 Likes