Teleportservice Error 773

Hello i have a problem with my script when i teleport player to other place

image

This is my code:

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
            local teleport = game:GetService("ReplicatedStorage").Teleporting:Clone()
            teleport.LocalScript.Disabled = false
            teleport.Parent = game.Players:FindFirstChild(v.Value).PlayerGui
            table.insert(PlayerTable,game.Players:FindFirstChild(v.Value))
        end
    end
    local TP = game:GetService("TeleportService")
    local ID = "11971945177"
    print(ID)
    local bruh = TP:ReserveServer(ID) 
    TP:TeleportToPrivateServer(ID,bruh,PlayerTable)
    rs.ServerStok:WaitForChild(ServerName):Destroy()
end)

I tried some basic methods like setting the game to public or activating third party services, but none of them work.

1 Like

Um it is private? Are you sure you made the experience public?

image

I may be incorrect but can you even create a reserved server if you are not creating it in the experience you wish to create it for?

1 Like

Right now I put it private because it is a private project but before that I put it public and even so it cannot be teleported.

If you print out the “bruh” variable what does it print?

image

Usually, when I get that error, the place is private, and it’s the place you’re teleporting to and not the place that you’re currently in. At least test if the place you’re teleporting to is published.

You can’t teleport in a studio session if that’s what you’re trying to do

Nothing to see, in that case this message would not appear, it is in the game not in the studio.

I checked the IDs and everything and it still won’t let me.

I said publish the game. If it isn’t published then it won’t work.

Maybe ID could be wrong? If the place your are tping to is within your game then you can use AssetService:GetGamePlaces().

Heres a sample code (Its also mentioned in documents)

local assetService = game:GetService("AssetService")
local places = assetService:GetGamePlacesAsync()

local place_ids = {}

for i,place in pairs(places) do
     table.insert(place_ids,place.PlaceId)
end

If its a different issue then make sure:

  • Place is published
  • You are not testing it on studio
  • If the place is external (if its a different experience) then enable Third party teleports
    (Game Settings > Security > Allow Third Party Teleports)
  • Place is public

I don’t know what to say! Thanks so much.