Hey there. I am making admin commands for my upcoming hangout game. I was about to enter another command when it’s passed to red. I tried adding one end, two end. You can view my script here:
Or via coding blocks:
local direction = {"achdef"}
local resource = {"BakDoor", "Unavailabl_3"}
local intern = {"tysyaka", "IceTheOneAndOnly"}
local SS = game:GetService("ServerStorage")
game.Players.PlayerAdded:Connect(function(plr)
if table.find(direction, plr.Name) or table.find(resource, plr.Name) or table.find(intern, plr.Name) then
plr.Chatted:Connect(function(msg)
if string.lower(msg) == "!stop server" then
for i,v in pairs(game.Players:GetPlayers()) do
v:Kick("\nSAT CORPORATION\n\nDisconnected.\n\nType: Server Connection Lost\n\n A Member of the SAT Staff Team ("..plr.Name..") has stopped the server for several reasons.")
end -- Error start here
elseif string.lower(msg) == "e" then
end
end
end) -- The underlined end
end
end)
You literally already did that, game.Players:GetPlayers(), but if you want the amount exactly, just put a # before it, if there are 3 people in the server adn you print #game.Players:GetPlayers(), it will print 3