CreatePlaceAsync Returns an Error Template Place Cannot Be Copied?

Hey,
I am trying to create an instance of my place and teleport the player to that instance. I cannot do this because I get an error on the 7th line and the error only states that the template place cannot be created. Below is the place layout as well as the script and the output. I am trying to use create place async on the “test World” place and I am trying to teleport them from the start place.

image

This is the entire server script:

local as = game:GetService("AssetService")
local ts = game:GetService("TeleportService")
local re = game.ReplicatedStorage.REs:FindFirstChild("WorldTeleports")

re.OnServerEvent:Connect(function(plr, id)
	print(id)
	local NewPlaceId = as:CreatePlaceAsync("test World", id)
	ts:TeleportToPlaceInstance(id, NewPlaceId, plr)
end)

This is the error:

I’ve tried a few things and I’ve searched all over to find a solution but none of them seem to work. This is why I have come to the forums to hopefully get an answer.

https://wiki.roblox.com/index.php?title=Dynamic_place_creation_and_saving&redirect=no#Enabling_place_creation_and_saving
You must enable place copying before attempting to copy a place. The error says ‘TemplatePlaceCannotBeCopied’.

4 Likes

It worked but now I am getting this error the game is active. image

You’re calling TeleportToPlaceInstance with the template place ID and the new place ID as the arguments. TeleportToPlaceInstance accepts a place ID and an instance ID, but we only have a place ID. Therefore, the correct way to teleport the player would be like this.

ts:Teleport(NewPlaceId, plr)

TeleportToPlaceInstance is only used for when you want to teleport a player to a specific server in a place, for example, a server with a specific player in it.

5 Likes

Bless worked

psst, mark it as solution