how do you check a state of a game, i want to make a script that sees the state of game like if the game is down it will see it and do an event like show an gui or kill all the players.
how would you do it?
how do you check a state of a game, i want to make a script that sees the state of game like if the game is down it will see it and do an event like show an gui or kill all the players.
how would you do it?
The Roblox DataModel offers a function called :BindToClose(). This function takes an arguement, which is a function. If you were to kill all the players when the game closes, you can do so with this. When a server is shutdown, you have to 30 seconds to save the final stuff, and the serer will fully shutdown. This is usually used for doing DataStores because players will be kicked when this functions is fired.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
If your Roblox game were to go down it'd just kick all of the players out, so this is unnecessary.
i mean an event as in move players from real server to a cloned server