Soft-Shutdown code review

I have searched up on Google how to create a soft-shutdown by: https://www.youtube.com/c/RobloxDeveloperAcademy for my game I’m creating. Just wanted to share the code as I am not familiar and never have used soft shutdowns before:

I have made a GUI with a Frame and TextLabel inside:

1:

2:

1 Like

Correct me if i’m wrong, but can you even teleport to the same place?

According to the people I asked, they said it has to be teleported to a completely random place.

Yes, I believe it teleports players to a different server.

On first glance.

The code is a little bit messy. It works but once u get teleported to privet server, this server wont be able to be accessed by other players.

But yea if it works then its good

Can there a script to shutdown the server?

I suppose game:Shutdown() would work, but it can only be executed via the command bar.

The closest thing that can be made by a server is just kicking all the players → Server Emptied → Server Shutdown.

2 Likes

Please post your code as a code block instead of an image (alt). It would help because we would be able to scroll through your code and highlight pieces of it. Asking for code help with an image instead of actual code makes it more difficult to provide a good review or do some testing with.

2 Likes