Hello, when I set join data, and then receive it, theres nothing in it, here is my code:
-- main game that teleports the player, it teleports me with no error
local ts = game:GetService("TeleportService")
r.OnServerEvent:Connect(function(plr)
print("player wants singleplayer")
local teleportOptions = Instance.new("TeleportOptions")
local teleportData = {Mode="Singleplayer"}
teleportOptions:SetTeleportData(teleportData)
wait(0.05)
local code
code = ts:ReserveServer(15591987221)
local sucx,eor = pcall(function()
game.ReplicatedStorage.TeleportGui:FireClient(plr)
ts:TeleportToPrivateServer(15591987221,code,{plr},teleportOptions)
end)
end)
-- Recieving game
pcall(function()
local jd = plr:GetJoinData()
local td = jd.TeleportData
print(jd,#jd,jd[1],td)
if plr:GetJoinData().TeleportData then
for i,v in pairs(jd) do
print(i,v)
end
for i,v in pairs(td) do
print(i,v)
end
if td.Mode == "Singleplayer" then
print("singleplayer")
return
end
else
print("no joindata")
end
end)
print("not singleplayer")
What Prints