Can't teleport: Accessing user layer that has not been registered

You can write your topic however you want, but you need to answer these questions:

  1. I want to be able to teleport to a private server again.

  2. What is the issue? Include screenshots / videos if possible!
    I keep getting this error. Everything worked and I know my code isn’t wrong because it worked but now suddenly I keep getting this weird error on the client side.

Can we see the code so it can help us determine what might be causing this?

I did some searching and I just see that it’s a Roblox error that happens.

Still, I want to see the code to determine why it isn’t working.

I think this has nothing to do with your scripts as i have got this error as well.

This seems to happen in many, if not every Roblox game, this is probably just a mistake on Roblox’s side.

												local TeleportTable = {}
												
												for i,v in pairs(PlayersInRoomTable) do
													
													table.insert(TeleportTable,Players:GetPlayerByUserId(v))
						
												end
												
												local ReserveCode = TeleportService:ReserveServer(10589338090)
												
												TeleportService:TeleportToPrivateServer(10589338090, ReserveCode, TeleportTable)`

This is done through a server script, correct?

ReserveServer() Does not work on Client, which is why I ask.

Yeah its done on a server script. And it worked like an hour ago but then suddenly it stopped working when i didn’t change anything.

Is this all of the server script? Nothing else to it?

Im pretty new to lua so my code may be a little messy. But this is pretty much all of the important code.

`if EnoughPlayers.Value == true or EnoughVotes.Value == true then

											RoomStatus.Value = "Game starting in 1!"

											wait(1)

											if EnoughPlayers.Value == true or EnoughVotes.Value == true then

												RoomStatus.Value = "Teleporting players..."
												
												local TeleportTable = {}
												
												for i,v in pairs(PlayersInRoomTable) do
													
													table.insert(TeleportTable,Players:GetPlayerByUserId(v))
						
												end
												
												local ReserveCode = TeleportService:ReserveServer(10589338090)
												
												TeleportService:TeleportToPrivateServer(10589338090, ReserveCode, TeleportTable)
												
												for i, v in pairs(PlayersInRoomTable) do

													local PlayerGui = Players:GetPlayerByUserId(v):FindFirstChild("PlayerGui")

													local TeleportScreenGui = ReplicatedStorage.TeleportScreenGui

													local NewTeleportScreenGui = TeleportScreenGui:Clone()

													NewTeleportScreenGui.Parent = PlayerGui

													local BlackFrame = NewTeleportScreenGui.BlackFrame
													
													BlackFrame.Visible = true

													PlayersInRoom.Value = PlayersInRoom.Value - 1

													for index, PlayersThatVote in pairs(PlayersWhoVotedTable) do

														if v == PlayersThatVote then

															PlayersWhoVoted.Value = PlayersWhoVoted.Value - 1

															table.remove(PlayersWhoVotedTable, PlayersThatVote)

															table.remove(PlayersWhoVotedTable, index)

															VoteStatus.Value = PlayersWhoVoted.Value.."/"..PlayersInRoom.Value

														end

													end

													table.remove(PlayersInRoomTable, v)

													table.remove(PlayersInRoomTable, i)

													PlayerLeftRoom:FireAllClients(Players:GetPlayerByUserId(v), PlayersInRoom.Value)

												end
								
											end`

Try printing the PlayersInRoomTable.

I have no idea what’s going on but for some reason it works now. Thank you!