Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can't teleport to places created with CreatePlaceAsync?

Asked by 6 years ago

Hi.

So, I'm trying to teleport to places within the same universe that have been created with the function CreatePlaceAsync, a function of AssetService.

But, when I try to do that, it returns this error:


Teleport exception: HTTP 400 (HTTP/1.1 400 Bad Request)


What does this mean and how can I resolve it?

Here's my code, if you need it:

local tpService = game:GetService("TeleportService")

script.Parent.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        tpService:TeleportToSpawnByName(game:GetService("DataStoreService"):GetGlobalDataStore():GetAsync("placePlayerPlap-"..player.UserId), "MainSpawnPoint")
    end
end)

1 answer

Log in to vote
1
Answered by
JellyYn 70
6 years ago

I don't really use TeleportService, but maybe try enabling studio access to API Services and HTTP Requests if you haven't already. I thought this, since it says Teleport exception: HTTP 400 (HTTP/1.1 400 Bad Request) so maybe you have the HTTP Requests disabled

If you don't know how to enable them, go to the Home tab, and Game Settings, then look through them. (This is done in Studio)

Ad

Answer this question