So I am making this thing for a group. I wanted to make a thing, where if you say "DevSpecial" or something, you are put into the dev team. I am having problems line 14-15 (in studio it is line 24-25)
18:56:38.974 - Teams is not a valid member of Teams 18:56:38.991 - Script 'Workspace.Script', Line 25 18:56:38.992 - Stack End
local group = {
["JohnTDev"] = true;
["JohnTUnderwood"] = true;
["littejo29"] = true;
["Player"] = true;
}
game.Players.PlayerAdded:connect(function(player)
if group[player.Name] then
player.Chatted:connect(function(msg)
if msg == "DevSpecial" then
local character = game.Workspace:FindFirstChild(player.Name) and game.Teams
local Teams = game.Teams
if character.Teams == "{Officers}" or "{Trainees}" or "{Jedi Order}" then
character.Teams= "{Dev Team} (SPECIAL)"
character:FindFirstChild("Humanoid").Health = 0
end
end
end)
end
end)
What do I do? Youtube and the wiki aren't helping me find what I want.

4 comments
Sorry for the late response. Is it suppose to be like this?
game.Players.PlayerAdded:connect(function(player) if group[player.Name] then player.Chatted:connect(function(msg) if msg == "DevSpecial" then for i,v in pairs(game.Teams:GetChildren()) do if v.TeamColor == player.TeamColor then if v.Name == "{Officers}" or v.Name == "{Trainees}" or v.Name == "{Jedi Order}" then player.TeamColor = BrickColor.new("Black") player:Lo
player:LoadCharacter() end end end end end) end end)
yes