I want to teleport players to a reserved server using this script
local placeId = 12345 -- just an example id
local playerList = Players:GetPlayers()
local code = TeleportService:ReserveServer(placeId)
local teleportData = {}
teleportData["code"] = "test data"
TeleportService:TeleportToPrivateServer(placeId,code,playerList,teleportData)
then when i try to receive the data i use this script
local tService = game:GetService("TeleportService")
local data = tService:GetLocalPlayerTeleportData()
if data then
local accessCoder = data["code"]
script.Parent.Text = accessCoder
else
script.Parent.Text = "No Data"
end
Every time i test it, It gives me “No Data”