Setting team wont work

I am trying to assign a team whenever someone join but it wont get assigned

game.Players.PlayerAdded:Connect(function(p)
	p.TeamColor = BrickColor.new("Medium stone grey")
end)

image

please help

It might be easier to do the following instead:

game.Players.PlayerAdded:Connect(function(plr)
	plr.Team = game.Teams.Lobby
end)
1 Like

I tried both of it but it still doesn’t work
image

Can you confirm that the AutoAssignable property of all of the teams is set to false?

Wait nevermind, I did the script in a local script but now it works.