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

Sending objects such as stringvalues/parts/etc with TeleportService?

Asked by 8 years ago

I was wondering if it's possible to send objects like parts, stringvalues, and other stuff with a player when using the TeleportService. I plan to use Universes and Datastores for my game, however there's a few things that I don't feel like having the Datastores save that I feel would be much easier to just have transferred over with the player when they move place to place. I read the Wiki guide for the TeleportService and saw that there's a function called TeleportToPlaceInstance, would that work with what I'm trying to do?

0
I think it's not possible, BUT you may create functions that can recreate objects in another server if you give some information. Wutras 294 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

When using the TeleportService, you have a Variant type of argument called teleportData. teleportData can be ANYTHING a DataStore can also hold. So no, you cannot have an Instance such as a part sent from the first game to another one. However, you can store the properties of a part in a table and create it after they've teleported.

TeleportToPlaceInstance does not allow you to bring an Instance with you (Besides a static loading GUI). So, if you want to save a weapon name as a string, you are able to bring that information with you and with the LocalPlayerArrivedFromTeleport, you can retrieve that string and get the weapon if you've stored it in the new place, and so on.

Ad

Answer this question