I made some commands for my group, but I'm having an issue. I want it to be able to be used if the command is said in teamchat, but I can't find much. Here is my code. (I would appreciate a wiki link or an explanation for the solution, so I can learn for myself)
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
if string.lower(msg)=="reset" then
for k,plr in pairs(game.Players:GetPlayers()) do
if plr.TeamColor==BrickColor.new("Bright yellow") then
plr.PlayerGui.ResetGui.Frame1.Visible=true
plr.PlayerGui.ResetGui.Frame1.TextButton.Active=true
plr.PlayerGui.ResetGui.Frame2.Visible=true
end
end
end
end)
end)
