it says “No TeleportData found for player” which mean the data isnt sending please help
place #2
game.Players.PlayerAdded:Connect(function(plr)
local joinData = plr:GetJoinData() -- Updated to use GetJoinData
if joinData and joinData.TeleportData then
local teleportData = joinData.TeleportData
local userid = teleportData.UserId
print("Teleport Data UserId:", userid)
else
print("No TeleportData found for player", plr.Name)
end
end)
place #1
local function teleportToServer(plr, serverCode)
local id = ServerNamesDS:GetAsync(serverCode)
local code = ServerAccessCodesDS:GetAsync(id)
if code then
local TeleportData = { UserId = plr.UserId }
local teleportOptions = Instance.new("TeleportOptions")
teleportOptions:SetTeleportData(TeleportData)
print("Teleporting with data:", TeleportData) -- Debug line
TS:TeleportToPrivateServer(122839632522178, code, {plr}, nil, teleportOptions)
else
print("Invalid or expired server code.")
end
end
i dont understand. do you mean if you want to put another player into the same private server? or you mean that you want other players to go into different servers?
same private server, let me explain so i am making a lobby where there is 3 options create a server,join a server, and join your own server. iwant people to join a players server using a code crated