My kick command worked fine, until I added the elseif
There is no output. Here is the script: (Regular script in Workspace)
Admins = {"groovydino", "Player1", "Player"}
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
for i,v in pairs(Admins) do
if msg:sub(1,11) == "kick/spam/" then
for i,v in pairs(game.Players:GetPlayers()) do
if string.find(v.Name, string.sub(msg, 12)) ~= nil then
v:Kick()
local m = Instance.new("Message", game.Workspace)
m.Text = player.Name.." has kicked "..v.Name.." because "..v.Name.." has spammed."
elseif msg:sub(1,15) == "kick/falsekick/" then
for i,v in pairs(game.Players:GetPlayers()) do
if string.find(v.Name, string.sub(msg, 16)) ~= nil then
v:Kick()
local m1 = Instance.new("Message", game.Workspace)
m1.Text = player.Name.." has kicked "..v.Name.." because "..v.Name.." was false-kicking people."
end
end
end
end
end
end
end)
end)
