generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to shutdown a server

Previous Thread :: Next Thread 
VexTrexYT is online. VexTrexYT
Joined: 20 Dec 2016
Total Posts: 63
29 Jul 2017 05:52 PM
I am creating a game. I update my game every week. I think some servers will stay active for a long time. I know I can shut down a server but is there a script where I can shut down a server. Like after a timer, the server will shutdown.


Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
29 Jul 2017 05:54 PM
just get all the players at once
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
29 Jul 2017 05:55 PM
kick*

Player:Kick("Server Shutdown!")
Report Abuse
ForceCyber is not online. ForceCyber
Joined: 06 May 2015
Total Posts: 1086
29 Jul 2017 07:02 PM
You could destroy the NetworkClient, but use :Kick()
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
29 Jul 2017 07:05 PM
at the bottom of a serverscript ########### ## ## hours for example print 'warn everyone ur game shutting down' wait(10) -- give more time i guess -- kick everyone
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
29 Jul 2017 07:07 PM
Use a DataStore to broadcast whether or not the server should shut down, check over the server every couple of minutes, then if true:

for i,v in pairs(game.Players:GetChildren()) do v:Kick("Server shutdown!"); end
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
29 Jul 2017 07:19 PM
datastore not necessary in any case


Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
29 Jul 2017 07:21 PM
@wrath for a game-wide shut down (i.e. shutting down all existing servers) it is. Or you could use ########### but you would need a website of your own
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
29 Jul 2017 07:31 PM
neither one. i can already perform server wide messages/warnings without any of those things


Report Abuse
good_evening is online. good_evening
Joined: 30 May 2010
Total Posts: 791
29 Jul 2017 08:08 PM
@Wrath,

Yeah, Datastore is just a whole lot of extra work for nothing


Report Abuse
xXdrstattik33Xx is not online. xXdrstattik33Xx
Joined: 28 Oct 2015
Total Posts: 189
29 Jul 2017 08:12 PM
DataStore isnt that fast.. just use a website like ######## or something to update that to tell the script to do what u want.
Report Abuse
ChaoticRequiem is not online. ChaoticRequiem
Joined: 09 Dec 2011
Total Posts: 678
29 Jul 2017 08:29 PM
@Michael if you needed you shutdown every server you could just do it from the website, having a datastore for that would be a waste of time
Report Abuse
Briicks is online. Briicks
Joined: 03 Apr 2015
Total Posts: 1796
29 Jul 2017 08:55 PM
@people saying not to use datastore, well give op the other ways...


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
29 Jul 2017 08:59 PM
There is absolutely nothing wrong with using a data store key. OnUpdate would work absolutely fine. Using ########### solely for this reason is convoluted and unnecessary.
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
29 Jul 2017 09:02 PM
"Like after a timer, the server will shutdown."

tried to give op another way but filter thwarted me. prob wasn't what he wanted anyway

I have a loop in my game that checks if a certain model was updated using GetProductInfo, so just update a model when you wanna display a static warning. Maybe even customize the warning/message through the description


Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
29 Jul 2017 09:10 PM
@wrath Then how would a server know when to auto shutdown if the game has been updated without using web calls in DataStoreService or HttpService?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
29 Jul 2017 09:11 PM
Wait, I just read the OP. Why are we even discussing this?

local players = game:GetService("Players")

wait(maximumServerTime)

players.PlayerAdded:Connect(function(player)
player:Kick()
end)

for _, player in pairs(players:GetPlayers()) do
player:Kick()
end)


Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
29 Jul 2017 09:15 PM
@Unsub OP says that he updates the game every week, and he wants to be able to shut down all running servers when he makes an update. You cant really do this from a script unless you use some sort of web call. Of course you can always manually "Shut down all running servers" from the roblox game page.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
29 Jul 2017 09:16 PM
If you want to shut all servers down, with a warning, use a data store key.


Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
29 Jul 2017 09:19 PM
@unsub that is what i have been saying for a while now lol
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image