How to transfer data from two games

I’m making a tower defense game and in one game (which is the lobby) you can equip random units and in the main game they appear. My question is, how would I do this, since they are in two different games.

The main game is a place in the lobby game.

You should just have 1 game with 2 places. A Roblox game is made up of one or more places. There is always a “starting place”. You should make the starting place the lobby and make the place where the players actually play the other place.

For transferring data between teleports, well, this article has most of that covered:
https://create.roblox.com/docs/mechanics/teleporting-between-places

1 Like

In Your Lobby
Note : you must assign the player.

local Data = {Currency =  1000}
local PlaceId = 0000
local TeleportOptions = Instance.new("TeleportOptions")
TeleportOptions:SetTeleportData(Data)
game:GetService("TeleportService"):Teleport(PlaceId,plr,TeleportOptions)

In Your MainGame

game.Players.PlayerAdded:Connect(function(plr)
local JoinData = plr:GetJoinData()
local TPData = JoinData.TeleportData
local Currency = TPData.Currency
print(Currency) -- 1000
end)