Hey, sorry about posting for support so much. ![]()
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.