no errors in the output Purpose: when :Teams is typed by an admin teams are created a blue an red team Problem: teams dont even pop up on the leaderboard
admins={"Threatboy101","vinothpizza555"} function isAdmin(player) for index, value in pairs(admins) do print("level 2") if player.Name:lower() == value:lower() then print("level 3") if string.sub(msg,1,6)==":Teams"then print("level 4") teams = game:GetService("Teams") -- A variable for teams blue = Instance.new("Team", teams) -- The new team blue.Name = "BLUE" -- The team's name is "Sup" red = Instance.new("Team", teams) red.Name="RED" print("level 5") return true end end end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(isAdmin) print("level 1") end)
admins={"Threatboy101","vinothpizza555"} function chat(msg, player) for index, value in pairs(admins) do if player.Name:lower() == value:lower() then if string.lower(msg)==":teams"then teams = game:GetService("Teams") blue = Instance.new("Team", teams) blue.Name = "BLUE" blue.TeamColor = BrickColor.new("Bright blue") red = Instance.new("Team", teams) red.Name="RED" red.TeamColor = BrickColor.new("Bright red") end end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(chat) end)