Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To Detect If The Game Is Updating And Kick All Players?

Asked by 4 years ago

I am Trying To Figure out How This Would Work And Have Tried Multiple Methods But nothing Works

3 answers

Log in to vote
0
Answered by 4 years ago

If you wanna know when the server shutdown, u gotta use game.BindToClose. Here's an example that teleports everybody to a new server.

local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")

game:BindToClose(function() -- Detect when the server shutdown
       wait(2)
       for i,v in pairs(Players:GetPlayers()) do
       TeleportService:Teleport(game.PlaceId,v)
    end
end)
Ad
Log in to vote
2
Answered by
Axenori 124
4 years ago

You can just use the shut down all servers feature, it'll kick all players and therefore update all servers

0
noice CaIcuIati0n 246 — 4y
0
Yeah But How Would I detect When It Updates So That Would Happen Magicdevice3 58 — 4y
Log in to vote
0
Answered by 4 years ago

There is a system called "Softban". i don't know whether if you have heard of it but you can search the marketplace or google a script like that and parent it to the ServerScriptService.

Answer this question