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

How would I detect if a server is about to shutdown?

Asked by 5 years ago

I have seen this in games like Miners Haven. It shows a gui before the server shutsdown. Same thing happens when your about to shutdown a game with hd admin. What I would like to know is how you can use a script to see when this is about to happen.

0
That's because they decided to initiate a "shutdown" so they know it will happen, that being said there is no native support to do this, but you can for example show everyone a gui then kick everyone and keep kicking people that join until it shuts down by itself. You can however trigger some code to happen during the actual shutdown with `BindToClose`. gullet 471 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello sir you can Detect if the server is shutting down using BindToClose function (https://developer.roblox.com/api-reference/function/DataModel/BindToClose) There are scripts called soft shutdown you can search it in roblox studio they are a great demonstration of how it works. Also sry for bad english.

Ad

Answer this question