TeleportData not going through

Hey, sorry about posting for support so much. :grimacing:

So now I have found the error that either the teleport data when I teleport isn’t going through, or isn’t going through correctly.

Server 1 Code:

		local reservId = teleportService:ReserveServer(4595982404)
		local teledata = {
			lobby --The table shouldn't be the problem if I am aware.
			L1,
			L2
		}
		if lobby == 1 then
teleportService:TeleportToPrivateServer(4595982404,reservId,L1,teledata) --L1/L2 are a array of players that will be teleported- works fine.
elseif lobby == 2 then
teleportService:TeleportToPrivateServer(4595982404,reservId,L2,teledata) --L1/L2 are a array of players that will be teleported- works fine.
end

Server 2 Code:


	local TeleportService = game:GetService("TeleportService")

	
	game.Players.PlayerAdded:Connect(function(player)
		print('check1')
		local joinData = player:GetJoinData()
		 print('check2')
		local teleportData = joinData.TeleportData
		if teleportData then
			print('check3')
				if teleportData.lobby == 1 then
					print('check final')
	TeleportService:TeleportPartyAsync(4595457901,teleportData.L1,teleportData.lobby,script.Load) 
	
		elseif teleportData.lobby == 2 then
			TeleportService:TeleportPartyAsync(4595457901,teleportData.L2,teleportData.lobby,script.Load) 
				end
				end
	end)
    ```

It is acting as if there is no teleport data on this check:

if teleportData then

I clearly sent teleport data over, and I am confused as to why it is not working.

Thanks for any help you can offer!

If possible, only reply with possible solutions to what I have talked about, try not to clutter the replies with simple errors such as indentation or other things as I am not the most organized scripture. Also yet again, it may be a simple error I am skipping over, if that is right, my apologies.

Found error by myself, sorry.

1 Like

I had the same problem, except I used Booleans. I had sent the information, but I couldn’t get it. It was pretty annoying until I found a solution. First: If you already have an object or boolean or string you created, you have to create it with the script and then send its information. Second: Use this two functions.

Apologies for the late response, but I see how you mean you would create it with the script. But aren’t I already doing that? I created the table in the script and then sent it over.

		local teledata = {
			lobby --The table shouldn't be the problem if I am aware.
			L1,
			L2
		}
1 Like

@ContentSolace One question, what exactly is this information? Booleans, strings or objects?