I want to make it so that upon a player joining, a team is created and that player is assigned to that team by themselves. Friends will be invited to join the team with a separate gui/script. I’ve got the team creation part down with a remote event, but I’m wondering how I can make this more efficient. Here’s the script so far.
CreateTeam.OnServerEvent:Connect(function(Player)
local newTeam = Instance.new(“Team”)
newTeam.Parent = game.Teams
newTeam.AutoAssignable = false
newTeam.Name = "TeamOne"
Player.Team = newTeam
local array = {10, 40}
print(array)
end)
Those arrays are me racking my brain to figure out how to implement tables, as I’m thinking that I can apply some kind of variable/table system but I’m not exactly sure how I would go about it.