I made this server script shut down the server when I say "shut it down". It doesn't work. Please help.
players = game.Players
Sound1 = game.Workspace.ShutdownSound
Sound2 = game.Workspace.BSound
GUI = game.ServerStorage.GUI
game.Player.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if player.name = "yoshiegg6" and msg = "Shut it down" then
Sound1:Play()
Sound1.Looped = true
H = Instance.new("Hint", game.Workspace)
for i = 10,1,-1 do
H.Text = "Server shutting down in"..i.."seconds"
if i = 1 then
Sound2:Play()
for q,e in pairs (players:GetChildren()) do
GUI:Clone().Parent = e.PlayerGUI
end
for j,k in pairs (players:GetChildren()) do
k:Kick()
end

2 comments
Thanks.
Please upvote and accept. It helps me out. kthxbai