Error 400 Bad Request CreatePlaceAsync()

local AssetService = game:GetService("AssetService")

local description = "World generated by an user"

local TeleportService = game:GetService("TeleportService")

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,name)

local PlaceID = AssetService:CreatePlaceAsync(name,1240467309,description)

end)

HTTP 400 Error Bad Request

The goal is to create a place and teleport to it, script ends at line 6
local PlaceID = AssetService:CreatePlaceAsync(name,1240467309,description)
I don’t know how to fix it

2 Likes

The place id in that function has to be uncopy-locked in order to use :CreatePlaceAsync (for more info go to the documentation here), so unfortunately you’re going to have to use another method such as making a reserved server and teleporting the user there (although this may have some cons based on what project you’re working on)

So how do I rebuild the script?