Sending data between places safely

I am creating a game with several places. I am trying to figure out how to send data between those places without using TeleportData for security reasons. How can I send data between my places safely? I’m assuming you will need to use DataStores, if so, how do I utilize DataStores to solve my issue?

You can check the placeid that the teleportdata came from. If you want more information read this.

What are the security reasons? If you Teleport from the server there shouldn’t be any security issues. If you are initiating the teleport from the client, just fire an event to the server to do the actual teleport.

If you can use TeleportData you should - it is much simpler than using a data store for this purpose.

Player data. TeleportData is sent with the client and can be tampered with.

I would look into MessagingService | Documentation - Roblox Creator Hub and MemoryStoreService | Documentation - Roblox Creator Hub for this.

TeleportData is transmitted with the client but Roblox takes steps to invalidate TeleportData that doesn’t meet a set security criteria: read the documentation. Admittedly the steps to make it even more secure require a bit more work than should be necessary but it is possible. TeleportData should not be undermined because of this, it is still entirely safe to use.

That being said, it’s also important to figure out exactly what types of data you’re trying to transfer between places. Depending on your needs, you should look into MemoryStoreService (linked above) instead. MessagingService is not an adequate solution however; it is designed for cross-server communication, not data transfer. There are better services for that.