Is there a way to make an individual player rejoin the same server?

So for a developer product in one of my tycoon games, I’m thinking of making it so that if players want to switch their team to a different one, that they could pay robux to have their base reset and have them teamed on the “Hiring” team, where players pick their base.

The simple solution that I thought of would be to “kick” the player from the game and then immediately have them “rejoin” the same server, so the onplayerleave function in the tycoon scripts don’t get messed with too much.

Is this possible, or would I have to find an alternative method?

3 Likes

And in what way would that benefit them over having to just rejoin the game? If they really want to rejoin the same server they would most likely add someone as a friend and then follow them into the game.

Ideally it would make it so that the process would be immediate. To friend someone random in the game, could be a risk since 1) The player they friended might not have follow on and 2) the five seconds they spend find said friend’s profile on the ROBLOX site could result in the server filling up in the meantime.

It still doesn’t explain to me as to why they would choose to join the exact same server, however this should have an answer for you;
https://developer.roblox.com/en-us/api-reference/function/TeleportService/TeleportToPlaceInstance

3 Likes

I’m sure that it’s not that hard to implement this without having the player rejoin the game. I’d certainly try doing this without kicking the player.

1 Like

i dont know, but the way i rejoin the same server is by staying in the current server, then press the Play button of the game, it will remove the other roblox client and open the new client in the same server you were in. it works for me.