Assigning team on playerjoin [Solved]

I feel slightly ashamed asking this but I’m a beginner who’s trying to learn at the moment.

I’m trying to assign a premade team in the teams folder to every player that joins, however, when I join, it assigns me to a random team. I’ve tried multiple solutions, however I’m completely stumped, can anybody help?

Lua Code
-- This is stored in Serverscriptstorage
local Players = game.Players

local function autoassignlobby(Player)
	Player.Team = game.Teams.Lobby


Thank you!

there is a property in the team’s instance caleed AutoAssignable you could turn it off so you don’t get automatically assigned.


So if I turned off autoassignable on all the other teams except the one I need, that’ll mean on join all players will be forced to the one autoassignable on team?

when they join they will get auto assigned to the only team that you kept the AutoAssignable property on for it.

1 Like