Teleport service not working

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

  1. Im making a game where im in need of a lobby system, utilizing 2 places in 1 experience.

  2. Im getting "Attempted to teleport to a place that is restricted, but i know for a fact it isnt. Triple, quadrouple checked everything and googled for 2 days.

  3. I have tried multiple different systems made by different people, and i tried scripting myself but nothing changed. Still getting the same error. And i have tried using a Third-Party game (WITH 3RD PARTY SETTINGS ON DONT MENTION IT) with no avail.


game:GetService("ReplicatedStorage").Remote:WaitForChild("Start").OnServerEvent:connect(function(player,ServerName)
	local PlayerTable = {}
	 for i , v in pairs (game:GetService("ReplicatedStorage").ServerStok:FindFirstChild(ServerName).Player:GetChildren()) do
		wait()
		if game.Players:FindFirstChild(v.Value) then
			game:GetService("ReplicatedStorage").Teleporting:Clone().Parent = game.Players:FindFirstChild(v.Value).PlayerGui
			table.insert(PlayerTable,game.Players:FindFirstChild(v.Value))
		end
	end
	
	local TP = game:GetService("TeleportService")
	local bruh = TP:ReserveServer(10479046925) 
	TP:TeleportToPrivateServer(10479046925,bruh,PlayerTable)
    game:GetService("ReplicatedStorage").ServerStok:FindFirstChild(ServerName):Destroy()
end)

Link to game if needed

Hmm. Nothing I can really think about here other than a post that dates pretty old:

Maybe there is something to fix here but I don’t have any ideas as of the moment.

this usually happens when you use the Teleport Service to teleport to other games, not places within a game.

Thank you, i will check out that post!

Thank you, but as said i have already tried this. And the places are all published, so its not that.

The code does not seem to have an issue at first glance so instead let’s do a little bit of trouble shooting to see exactly what the problem is.

Instead of acquiring the table of players, attempt to teleport just yourself into the private server and see if it still fails. Test this in-game, not from studio, obviously.

I fixed this twice the past 2 days. I had to go to the place I was teleporting to then re-publish it!

Tried using two different modules made by people, and error “Unable to cast Value to Objects” appears both times. I may be getting the player wrong, but dont think i am.
Skjermbilde

How did you go about re-publishing it? More specific sulotion is appreciated

Alright so i took a guess what you meant, and it worked, thank you all for the help!

Well, basically go into the view tab then click AssetManager then Places then Double Click on the place your teleporting to. This should open a new roblox studio window in the place you are teleporting to, then click File -> Publish To Roblox

No problem! Glad I could help! Good luck on your game!

Thank you! And to you as well!