It is not restricted, It is very much public. I’m using the exact same code from another game I made that works just fine. But for some reason this time it isn’t. This happens 100% of the time. I’ve checked all the devforum posts I could find and still cannot fix this. I have no idea what is happening.
-- gameId is set to the placeId in the URL ontop of the page.
local players = {}
for x,v in pairs(lobby.Connected:GetChildren()) do
table.insert(players,v.Value)
end
local teleportData = {
levelstarted = lobby.LevelStarted.Value,
difficulty = lobby.Difficulty.Value
}
local teleportOptions = Instance.new("TeleportOptions")
teleportOptions:SetTeleportData(teleportData)
teleportOptions.ReservedServerAccessCode = game:GetService("TeleportService"):ReserveServer(gameId)
local code = game:GetService('TeleportService'):ReserveServer(gameId)
game:GetService("TeleportService"):TeleportToPrivateServer(gameId,code,players,nil,teleportData)