Attempt to teleport to a place that is restricted, Error Code 773

So I’m making a game where you can send a request to play a match with other players in-game. It they accept it’s supposed to teleport them to the game. Here is the code:

local TS = game:GetService("TeleportService")
local place = 1234567890
...
	game.ReplicatedStorage.AcceptedRequest.OnServerEvent:Connect(function()
		local code = TS:ReserveServer(place)
		TS:TeleportToPrivateServer(place, code, {player, game.Players[otherPlayer]})
	end)
end)

but the result looks like this:
Attempt to teleport to a place that is restricted, Error Code 773

How can I fix this?

Try publishing the game you’re trying to teleport to first.

the game itself is published, do you mean publishing the place? if so how?

Open the place in your Assets window, and publish it. I replicated the problem and that’s definitely how you fix it.

3 Likes

im still having this problem and i spammed the solution already