Hi can someone teach me how to make all players leave a game? and also I have a question when all players leave a certain server does the server get destroyed?
Thanks
Hi can someone teach me how to make all players leave a game? and also I have a question when all players leave a certain server does the server get destroyed?
Thanks
When all players leave a game, the server is shutdown. To shutdown a server, you would have to remove all current players from the server like so:
for _,v in pairs(game:GetService("Players"):GetPlayers()) do
v:Kick("Optional kick message here")
end
A server is shutdown when all players have left it. The easiest way is to destroy all of the Players in the players service
for _,v in pairs(game.Players:GetPlayers()) do
v:Destroy()
end
did you really just downvote my answer just to get yours accepted
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Attempt ?