TeleportService

So I have created a flight system that allows users to purchase a ticket for a specific flight using in game currency. The only issue is that it keeps telling me that I’m not authorised to play the game (Errror message in F9 Console). Can someone help me out?

The game will feature multiple biomes where the player can buy flights to that biome.
The places have access to API, Are public and allow 3rd party teleports. Am i scripting it incorrectly or something?

Here’s the code that teleports the player:

local ts = game:GetService(“TeleportService”)
local PlaceId_Main = 6867404497
local PlaceId_Desert = 13507136522
local PlaceId_New – for when next biome is in place ig

script.Parent.Letsgo.OnServerEvent:Connect(function(plr, Destination)
if Destination == “City” then
ts:TeleportAsync(PlaceId_Main, {plr})
elseif Destination == “Desert” then
ts:TeleportAsync(PlaceId_Desert, {plr})
end
end)

If anyone can help me out i would really appreciate it (I’m not asking for people to code for me btw).

2 Likes

Is the place inside of your game or not? Or is the game even available?

2 Likes

Is http service allowed, is the game a place in your game, is it another game, is that game/place public?
btw u can just use :Teleport(playerid, gameid)

1 Like

Yes http service is allowed, its a experience and teleports u to a place. But would it have to be put in the actual experience to ensure it lets u teleport to the place? I made it on a separate testing game.

I have tried using :Teleport() however it didnt work.

1 Like

I am sure it has nothing to do with HTTPService. The error seems to be that the game is either corrupted, doesn’t exist, or just roblox being roblox.

1 Like

yes it should be in the actual experience

1 Like

But how can i do it as its supposed to be a planned update? I cant really publish it.

well u cant tp to another game’s place :man_shrugging:

You can you need to have thirdpartyteleport property enabled for it.
(GameSettings → Security →


SHOULD BE ENABLED)

1 Like

game’s “place” not the actual game

ye it has that enabled but it doesn’t work

1 Like

is that other game in your group/account?

If it is enabled then maybe that game is private? or archived? either way one more solution is:
Go to the place → File → Publish To Roblox As → Game Name → Add as a new place

1 Like

all of the games/places are all owned by a group.

No the game is set to public and i have checked.

1 Like

try the second solution then. also after adding it as a new place please copy its placeid. and then put it in the script.

So i switched :TeleportASync() with :Teleport() and im getting this error.
image

this is the line of error:
image

Would it be game.Players[plr] instead of just plr?

1 Like

i jus removed the squidggly brackets instead and now i have this
image

for that error see this

1 Like

I think thats a roblox default error? maybe this would help Attempted to teleport to a place that is restricted. Error Code: 773 - #10 by Nonaz_jr
sorry no this one is the one.