Transferring data between 2 games

I want to transfer all the data in a game to another game. I dont know if its possible. Can someone please explain to me how to do it :smiley: :
Thank you!

1 Like

Data as in all Roblox datastore data?

Yes datastore data. Probably should have clarified that.

There is no ā€œsimpleā€ way like a button press. You could try to manually copy over data with Datastore Editor but as far as I know, there is no easy way to do this.

1 Like

Sadly we cant do it through a teleport script.

Another place of the same game or another game? If it is just another place then I think you can just use the same datastore. If it is a different game then you could probably use httpservice

1 Like

wdym, you can send data via TeleportService

I’ve literally done it before, my question is if there are other ways to send data besides using httpservice

1 Like

Unless 1 person teleporting from the old game to the new game brings everybody data than I cant do it.

2 different games. Also I dont know what a Http service is, if you could please explain those or send an example.

@DevRylen trust me ik what I’m talking about, you wouldn’t have any problems sending data via TeleportService

Again. Does it teleport everyplayers data who every played the game?

You are basically sending information to a web server and storing info there. It is like a datastore, but you have more freedom and data is stored on the web instead of roblox servers

you could send whatever data you want

besides it wouldn’t have to be a leaderstat value

It’s extremely inefficient but it works, yes.

Old Place Script (server script):

local DS = game:GetService("DataStoreService"):GetDataStore("keyhere")
local TS = game:GetService("TeleportService")

game.Players.PlayerAdded:Connect(function(plr)
    local data = DS:GetAsync('thedatakey')
    if not data then data = {} end
    TS:Teleport(0000000, plr, data) -- replace 0000000 with new place ID
end)

New Place Script (local script):

local TS = game:GetService("TeleportService")

wait()

local newRemote = game.ReplicatedStorage.DataRemote
local data = TS:GetLocalPlayerTeleportData()

newRemote:FireServer(data)

New Place Script (server script):

local DS = game:GetService("DataStoreService"):GetDataStore("keyhere")
local newRemote = Instance.new("RemoteEvent", game.ReplicatedStorage)
newRemote.Name = "DataRemote"

newRemote.OnServerEvent:Connect(function(plr, data)
    DS:SetAsync(plr.UserId, data)
end)
3 Likes

in cases where I want to send data(that wouldn’t be from a datastore) from one place(not another game, just a place in the game) to another, I think it’s actually helpful to use

besides you are the one who used TeleportService inefficiently

that’s what I think personally

If you’re concerned about data being transferred from the old place to the new place, why don’t you just save some data from the new game you want to transfer the data over from, that checks who has and hasn’t had a data transfer yet. Then, it teleports them to the old place to teleport the player back to the new place to transfer their data back over.

I’m not too experienced with datastores, so my response may not be as valid, but it makes sense to me, as I’ve seen other games do the same.

If you use this method I don’t recommend using GetLocalPlayerTeleportData() and instead use
player:GetJoinData().TeleportData

2 Likes

yea I use this when using TeleportService to send data