I am making a story game on roblox right now but I have an issue. I want to set a system in place where if you joined a game(Reserve Server) and you disconnect or leave and rejoin you get put in the Lobby but a UI pops up and asks if you want to rejoin your previous game and it can only pop up once per game and if you click no it doesnt pop up again for the rest of the time that game is and if you click yes it brings you back to the game but you dont keep any items so it clears your inventory.
This is the UI for reference.
Thanks for the help in advance. I am wondering how I would go about doing this in the lobby.
you will need to use datastore service. Basically, when the player is teleporting into the game, store the PlaceId,GameId,ReserveServerCode The reason you would want to store the data before teleporting the player is so that you have the reserveserver code which will allow you specifically teleport to their server
is the data being stored from the lobby or is it being stored once the player gets teleported to the reserve server then it send the data to the lobby?
Well, it depends, do you want to save it in the lobby when the player is being teleported, you can save it right before they are teleported for the best result, so incase they do not get into the game they should be teleported to, it would save it and can try again. If you don’t want it to save if they never joined the server, then save it from the server they connect to.
It should be stored before they teleport cuz I dont think you can get reserve server id outside of the lobby