As you know, the only way to shut down the server is to kick all of the players. That's my problem. It's not kicking everyone! How the script works, is that when a character dies, it make a value true and then kick everyone. Is there something wrong with this script?
while true do
wait(1)
if game.Workspace:FindFirstChild("ISDEAD").Value == true then
for i,v in ipairs(game.Players:GetChildren()) do
v:Kick("The Leader of the Noob Empire Is Dead. Rejoin.")
game.Workspace:ClearAllChildren(workspace.Terrain)
for i = 1, 100000000 do
wait(0.5)
v:Kick("The Leader of the Noob Empire Is Dead. Rejoin.")
game.Workspace:ClearAllChildren(workspace.Terrain)
end
end
end
end

1 comment
Are you using a regular script? If not, change it to regular.