Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I get the placeid of a place that was created by copying a template place?

I am trying to let the player join the place that they created by copying a template place. I can not figure out how to get the placeid of the specific place they created. I have the following code:

local createPrivateServerEvent = game.ReplicatedStorage.CreatePrivateServerEvent
local joinPrivateServerEvent = game.ReplicatedStorage.JoinPrivateServerEvent
local teleportService = game:GetService("TeleportService")
local assetService = game:GetService("AssetService")
local placeId = 2616317634

createPrivateServerEvent.OnServerEvent:Connect(function(player)
	local placeVersion = tostring(game.PlaceVersion)
	assetService:CreatePlaceAsync(player.Name.."'s private server", placeId, "The Private Server Of The User "..player.Name..". Version: "..placeVersion)
end)

joinPrivateServerEvent.OnServerEvent:Connect(function(player)
	local specificPlaceId = "I CANT FIGURE THIS OUT"
	teleportService:Teleport(specificPlaceId, player)
end)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.