You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Im making a game with my friends and as the main (only) scripter I have to learn how to use the TeleportService. After lots of attempts, Ive managed to nail it down to Error 773: The place attempted to teleport to is restricted. I’ve looked through the forums to yet no avail, and I’m going mad over it
What is the issue? Include screenshots / videos if possible!
^^
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Using TS:TeleportAsync, TS:TeleportPartyAsync, made all places open to friends only and on my main account joined, results in error 773. No Teleports work - Developer Console in game says that the place isn’t published, even though it is and has been for about a day now.
local TS = game:GetService("TeleportService")
local placeId = "14580650489" -- Enter a second Id Place.
local list = {}
local timer
local teleporting = false
local touchdb = false
local spawnTeleport = game.Workspace.MainLobby.JoinGameTP
local Mod = require(script.Parent.Parent.ModuleScript)
script.Parent.Touched:Connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
if teleporting == false then
local char = hit.Parent
local player = game.Players:FindFirstChild(char.Name)
local alreadyExists = false
touchdb = true
wait(1)
for i=1,#list do
if list[i] == char.Name then
alreadyExists = true
end
end
if alreadyExists == false then
if #list < 3 then -- Many Players have been teleported.
table.insert(list,char.Name)
char.PrimaryPart.CFrame = spawnTeleport.CFrame
end
player.CharacterRemoving:connect(function(character)
Mod.removeFromList(character, list)
end)
end
if alreadyExists == true and touchdb == false then
Mod.removeFromList(char, list)
char.HumanoidRootPart.CFrame = script.Parent.Parent.Parent.LeaveGameTP.CFrame + CFrame.new(0, 3, 0)
end
end
end
end)
while wait() do
timer = 3 -- Wait time before teleport change to whawtever you want it to be
for i=1,timer do
timer = timer - 1
wait(1)
end
Mod.teleportPlayers(list, placeId)
end
local tpfunc = {}
local TS = game:GetService("TeleportService")
function tpfunc.removeFromList(character, list)
for i=1,#list do
if list[i] == character.Name then
table.remove(list,i)
end
end
end
function tpfunc.teleportPlayers(list, placeId)
if #list > 0 then
local playersToTeleport = {}
local teleportTime = 0
for i=1,#list do
if game.Players:findFirstChild(list[i]) then
table.insert(playersToTeleport,game.Players:findFirstChild(list[i]))
else
table.remove(list,i)
end
end
local code = TS:ReserveServer(placeId)
TS:TeleportToPrivateServer(placeId,code,playersToTeleport)
repeat wait() until #list <= 0
end
end
return tpfunc
whereas the PlaceID is the ID found when you go to your creator dashboard and go to “Places” after selecting a game. You need to make sure its a PlaceID, NOT GameID.
That would be correct, yes. The reason why I asked about them being published is because in the console screenshot it shows the error as because both places aren’t published.
It looks like you’re working on a game with your friends and are trying to use the TeleportService to teleport players, but you’re encountering the “Error 773: The place attempted to teleport to is restricted.” issue. This error can be frustrating, but let’s see if we can help you resolve it!
The error message you’re seeing indicates that the place you’re attempting to teleport to is restricted. This could be due to various factors, such as the place being unpublished, private, or having certain settings that prevent teleportation. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
Check Game Settings: Make sure that the destination place has been published and is accessible to the public. Double-check the game settings to ensure that it’s open to all players or at least friends, if that’s the intention.
Player Permissions: If you’re testing with friends, ensure that the players you’re attempting to teleport have appropriate permissions to access both the current place and the destination place.
Teleportation Workflow: Ensure that you’re using the correct TeleportService method for your use case. If you’re trying to teleport a party of players, you can use TeleportService:TeleportPartyAsync. If you’re teleporting individual players, use TeleportService:TeleportAsync.
Check Place IDs: Double-check that you’re using the correct place IDs for teleportation. Make sure you’re specifying the correct place ID of the destination place.
Error Handling: It’s a good practice to include error handling in your teleportation script. You can use pcall to capture any errors that might occur during the teleportation process and handle them gracefully.
Testing: Try testing the teleportation with a simple script in a test place to verify that the issue isn’t related to the specific game you’re working on.
If you’ve already tried the above steps and are still encountering the error, it might be worth reaching out to Roblox Support for further assistance. They can help investigate and provide more specific guidance based on your situation.
Lastly, make sure that you’re using the most up-to-date documentation and resources from the Roblox Developer Hub. Sometimes there could be changes or updates that affect how certain features work.
I hope this helps you troubleshoot and resolve the teleportation issue. Good luck with your game development, and feel free to ask if you have any more questions!
Ive tried everything here - pcall responds with http 403, perms are now public, im using TS:ReserveServer and then TS:TeleportToPrivateServer instead of async because it just doesnt work for me at all, place ids are fine and games are both published fully
You must publish the place you want to teleport to. Go to file → Publish to roblox as (I think). The error you sent showed: “This game is not published”. May this help
If it doesn’t help, publis both places to roblox as.
1. Publish the place you are teleporting from. 2. After publishing find an option Shut Down All servers. 3. Use TeleportPartyAsync with a player in array.
Ive tried TeleportPartyAsync - I cant manage to get players into an array even tho its in a table and im also moving them into a priv server so reserveserver and teleporttoprivateserver is what im using. how do i shut down all servers?