Is there such script to shutdown every server open on your game.
I know theres a button on the game front-page for soft-shutdown but can I replicate it using a script ingame to shutdown every server.
Use messagingservice to contact each server at once. Then, when each server receives this message, kick all players!
Hmmm, example?
Or maybe documentation ?
A simple search will give you all the required information…
https://create.roblox.com/docs/reference/engine/classes/Player#Kick
Thanks!!!
: D
ejcjfjg8fh85htfj28ru8trj8eu
This seems very complex.
fuhehufhu
its not that hard
This is the script where we receive the data thingy
local MessagingService = game:GetService("MessagingService")
local Players = game:GetService("Players")
local function ShutdownServer()
for i, Player in pairs(Players:GetPlayers()) do
Player:Kick("Server shutdown")
end
Players.PlayerAdded:Connect(function(Player)
Player:Kick("Server shutdown")
end)
end
MessagingService:SubscribeAsync("Shutdown", ShutdownServer)
And then here is how you shutdown every server
MessagingService:PublishAsync("Shutdown", "l")
Thanks bro,
Also is this safe to use?
Maybe, Yes because using PublishAsync
on the client wont work and no one can abuse exploit this
maybe ???
thats not worrying…
TheFirstParameterIsForTheRecieverNameWeAreGonnaContact, AndTheSecondParameterIsTheDataThatWeAreGonnaSendForTheFirstParameter,
AndThenYouCanAccessTheDataWith SendData.Data
IfYouAddAnArgumentFortheFunction ShutdownServer()
Like ShutdownServer(SendData)
IfYouWantToSendAGlobalMessage
TheScriptISendYouHas0BackdoorScriptThingy,NoOneCanExploitThisIfYouArentUsingA RemoteEvent
ForShuttingDownServers BecauseAnExploiterCanFireA RemoteEvent
this does not seem to work, i call the PublishAsync and nothing happens.
Yes, I do.
rfffffffhhhhhhhhhhh