Hello, I have this system in my game where it puts every active server into my own personal database then removes them again when the server shuts using BindToClose. Now on the odd time, this is really rare but sometimes the server won’t remove from my database and this could be caused by anything really, api not working or even the server crashing.
I made this system so that I could manage servers and maybe teleport players from a smaller server into a bigger one but my issue is, if the server isn’t actually available and it’s still in the database. The game might try teleport the players to that server which isn’t active. I am using this code
TeleportService:TeleportToPlaceInstance(game.PlaceId, ServerId, plr)
This works perfectly fine when the server is available but when the server isn’t it just fires an error to the client saying teleport failed which basically freezes the player. Is there any way I can check the ServerId Instance to see if it’s an actual available server before I attempt to teleport the players? or can I maybe disable the popup that tells the player the teleport failed? Even if there is a way to check if the teleport failed then I could maybe use that code to tell the database to remove that server as the Teleport failed.
Any ideas, please let me know!