I’m working on a game related to endings that is single player. If a player wants to play with friends, they would have to go into a free VIP server. I’ve made it so that the player has to click a button to rejoin the server, and it works well for public servers… BUT for VIP servers, I made it so that it TPs the player to a reserved server and saves the reserved server’s access code through a datastore with the key being the PrivateServerOwner’s Id.
ex:
ReservedCode = DataStore:GetAsync(UserId)
When the player attempts to rejoin in a VIP server/reserved server. It gets the access code and attempts to rejoin. I tried bugtesting and prints to see if the codes are accurate and saving. IT IS WORKING! But when I attempt the teleport, it says:
Failed to connect to the Game. (ID = 17: Connection Attempt Failed).
If you are able to, please help with script examples, demonstrations, and breakdowns on what is happening. (I’m not new to coding, I just haven’t done this type of stuff before!)
The arguments or parameters that you use when calling it. I called it options since the newer method TeleportAsync uses options instead of parameters. What do you provide to the method you’re using at the moment?
EDIT: added a special third thing
Three things that might turn out to be silly:
Can you confirm to me that those are separate arguments and not just one table that you’re giving to TeleportToPrivateServer? (excluding the list of players)
Could you try setting the fourth argument (that you provide nil for) to an empty string ("")?
There’s two things returned when reserving a server, the ID and the code. Confirm you’re using the code and not the ID.
I was testing the game solo, and when I tried the rejoining, it had the same issue. I think it happens the server has no other players. Do you have any suggestions where I can counter my issue?
You mention it’s different depending on how many players are in. Can you show me how you’re creating the array of players that you pass into the teleport method?