CreatePlaceAsync HTTP Place Error

Hey Developers,

Sometimes I have to make something for friends and / or customers and they get an error when I use CreatePlaceAsync Hopefully you can help me and other people. Already readed somethings at AssetService But nothing works. Also place updated and saved, server shutdown, api enabled, http enabled etc.

  • Error:
Game:CreatePlace received and error: HTTP 0 (HTTP 403).
  • Script:
local TeleportService = game:GetService("TeleportService")
local TeleportPlaceID = 3361726326

script.Parent.Touched:Connect(function(Hit)
    if Hit.Parent:FindFirstChild("Humanoid") then
        local TeleportPlayer = game.Players:GetPlayerFromCharacter(Hit.Parent)
        local CreateNewPlace = game:GetService("AssetService"):CreatePlaceAsync("New Server",3361726326,"Here a short description")
        TeleportService:TeleportPartyAsync(CreateNewPlace, TeleportPlayer)
    end
end)

Thanks,
Siewva.

1 Like

I think your problem might be that you are passing a singular player instead of an array table which is what the function :TeleportPartyAsync() accepts as it’s second argument. Maybe try making a table and inserting the local TeleportPlayer = game.Players:GetPlayerFromCharacter(Hit.Parent) into that array table.

HTTP 403 describes an access forbidden code. The issue here is that you’re trying to run this code in a place owned by yourself to create a place that you don’t own or have edit access to. You lack sufficient permissions, so the call is sent but permission is denied.

You cannot fix this issue by changing your code. You will have to move this into the group “noobster’s group”, which the target place belongs to. Any code that isn’t running in a place under that group will not be permitted to use the create or save place APIs on places in that group, such as the one in your post.

A note; this is why you typically want to wrap any Http calls (internal or not) in a pcall so you can do manual error handling without your script terminating.

local success, result = pcall(AssetService.CreatePlaceAsync, AssetService, "New Place", TeleportPlaceId, "Short description")
if not result then
    warn(result)
end

That aside, if you’re trying to use create/save place APIs to make servers, don’t. Roblox specifically created ReserveServer so you’re able to create new servers. Roblox can issue ServerIds at no cost, while it’s more taxing to create places just to make a single throwaway server.


@HumbledDragon This script would throw two errors actually. You’re right on the correction you made, but that would only correct the second error. No error is being thrown for TeleportPartyAsync because the script is getting terminated at the CreatePlaceAsync part. TeleportPartyAsync and CreatePlaceAsync errors are unrelated. Yo could even solve this issue by doing this:

TeleportService:TeleportPartyAsync(CreateNewPlace, {TeleportPlayer})
2 Likes

Yea, great explanation! I had a few guesses on what it could be as you could see one of them was changing the player object into an array table and the other that I explained on discord was that maybe access wasn’t permitted to the person calling the function.