How would I make a soft shutdown system like Bedwars or any other big games?

I want to make it where if the player rejoins the game after an update, they get sent to the newest versioned servers instead of the older versions. Roblox Bedwars for example, has this, where if you rejoin, you are sent to the newest versioned server instantly.

You should be able to achieve this with :BindToClose. in terms of a soft shutdown. Quick example code to set you on the right track below.

game:BindToClose(function() -- this essentially fires right before the server shuts down. this includes shutting down the server via game settings.
	for _, v in pairs(game.Players:GetPlayers()) do -- you can loop through all the players and do an action, like for example, teleport them to a temporary reserved server.
		-- code goes here.
	end
end)

In terms of tracking if a server is an old server, you could probably do some checks with DataModel.PlaceVersion to achieve what you’re looking for.

1 Like

I meant rejoining. I don’t want to do a game shutdown. I never want my game to go private ever again and I just want the publish button to do it all for me

Make a place under the Places folder of the game, teleport them there, then teleport them back in the original game.