Whoever is an admin and if they say "Kick all players" then it should kick all players, it does not work. :(
Admins = {"PreyStar"} --Only person that could say remove and does the command
game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(function(Msg, Person)
if Person == (Admins[1]) then
print 'Worked?' --Does not print!!!!
if Msg == "Kick all players" then
for i,v in pairs (game.Players:GetChildren()) do
v:Kick() --I wanna kick the players if an admin says the msg.
end
end
end
end)
end)

2 comments
Just a little tip, it's better to use :GetPlayers() rather than :GetChildren() in this case. If an object that wasn't a "Player" was in Players, the script would error, causing not all players to be kicked. Also, you don't need to put = true on line 1. Just putting quotes around the name will do.
@Shawnyg, You're right on the first point, but your second point is wrong. When using brackets, you have to give a table's key, not its value. table = {"a", "b"} print(table["a"]) --> nil