Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to teleport someone back to the same vip server using localscripts?

Asked by
Derzett 51
4 years ago

So basically i'm trying to make the user rejoin their own vip server if they're in one using localscripts. The only way i can think of is firing a RemoteEvent and using reserverserver to teleport the player to a new vip server. But i just want to teleport the same player to the same server again

1 answer

Log in to vote
1
Answered by 4 years ago

Introduction

This is a very good question with a somewhat complex solution.

When programming things we have many ways to do something and I have 2 suggestions.

Solutions:

  1. The ReserveServer Code via Datastore

The first thing you can do is store the ReserveServer code into a datastore so that when they teleport back they can use that Code to teleport back to their reserve server. I personally wouldn't take this route as my next suggestion would be easier but Datastore is definitely a way.

  1. The ReserveServer Code via TeleportData OR GetJoinData

In the wiki, you may have noticed a couple things, GetTeleportDataFromLocalPlayer (not sure if exact) and GetJoinData. What you can do is when teleporting, send the reserve server code to the client or server and when they want to teleport back use that code to teleport them back.

I actually suggest the second option as it's less work and may or may not be less complex to you. Here's a couple of link that can help you out:

Resources / Links

https://developer.roblox.com/en-us/api-reference/function/Player/GetJoinData https://developer.roblox.com/en-us/api-reference/function/TeleportService/GetLocalPlayerTeleportData https://developer.roblox.com/en-us/api-reference/function/TeleportService/GetLocalPlayerTeleportData

0
Just be aware that the server might not still exist to return to if everyone left it. Expect to have to make a new reserved server. EmilyBendsSpace 1025 — 4y
Ad

Answer this question