I made a script that is activated by pressing a button, then it adds a team with the same name as the text in a text button, however, everything works except the name, when I hit the button, the team is added, turned blue, but doesnt have a name.
local teamservice = game:GetService("Teams")
game.ReplicatedStorage.Events.TeamAddedEvent.OnServerEvent:Connect(function()
local text = game.StarterGui.Editor.CreateTerritory.TextButton.TextBox
local newteam = Instance.new("Team",teamservice)
newteam.Name = text.Text
newteam.TeamColor = BrickColor.new("Bright bluish green")
end)

1 comment
unfortunately, this didnt work