Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 14 days 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 14 days 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 14 days ago

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

0
noice CaIcuIati0n 95 — 14d
0
Yeah But How Would I detect When It Updates So That Would Happen Magicdevice3 20 — 14d
Log in to vote
0
Answered by 14 days 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