Why is roblox returning error 773 "Teleport Failed: Access Restricted" whenever I try to teleport the player to a specific place instance on line 27 of this server script.
local createPrivateServerEvent = game.ReplicatedStorage.CreatePrivateServerEvent
local joinPrivateServerEvent = game.ReplicatedStorage.JoinPrivateServerEvent
local teleportService = game:GetService("TeleportService")
local assetService = game:GetService("AssetService")
local placeId = 2616317634
local dataStoreService = game:GetService("DataStoreService")
local jobIdStore = dataStoreService:GetDataStore("JobIdStore")
createPrivateServerEvent.OnServerEvent:Connect(function(player)
pcall(function()
local placeVersion = tostring(game.PlaceVersion)
assetService:CreatePlaceAsync(player.Name.."'s private server", placeId, "The Private Server Of The User "..player.Name..". Version: "..placeVersion)
jobIdStore:SetAsync(player, "")
teleportService:Teleport(placeId, player)
end)
end)
joinPrivateServerEvent.OnServerEvent:Connect(function(player)
pcall(function()
local instanceId = jobIdStore:GetAsync(player)
local triesLeft = 150
while instanceId == "" and triesLeft > 0 do
wait(0.1)
triesLeft = triesLeft - 1
end
print(instanceId)
teleportService:TeleportToPlaceInstance(placeId, instanceId, player)
end)
end)

2 comments
Is the select place you're trying to teleport the player to, active/public?
yes i can teleport them to the same instance right after i create it using "teleportService:Teleport(placeId, player)" without any errors and the place is public, so I have no clue why it isn't working with "teleportService:TeleportToPlaceInstance(placeId, instanceId, player)". I have also checked if it is getting the correct instanceId / jobid and it is.