Yeah its from a gate you go in
Are you running this script on the client or on the server? (Script or LocalScript)
Also, I’m pretty sure you should wrap this in a pcall function to prevent the script halting when errors occur, like this.
But it happens everytime and yeah it’s for sure in a script
how many gates do u have. In the problem it says GATE_A
and to me that means there might be other gates in the game as well.
Okay.
Could you:
- Point out the line that the error is on
- Make sure the game you’re teleporting to is public
Yes there is gate a gate c gate b but im only scripting gate a right now
The error is this line
local Code = TeleportService:ReserveServer(4701493313)
also i made a pcall now
local Players = game:GetService"Players"
local PlayerTable = {}
local TeleportService = game:GetService(“TeleportService”)
local Id = 4701493313
–//TeleportHandler
script.Parent.Touched:Connect(function(Touched)
if Touched.Parent:FindFirstChild(“Humanoid”) then
local Character = Touched.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
table.insert(PlayerTable,Player)
else
return
end
if #PlayerTable >= 1 the
print(“Almost yay”)
local Succes, Error = pcall(function()
local Code = TeleportService:ReserveServer(4701493313)
end)
if Succes then
print(“Succes”)
local Playerss = Players:GetPlayers()
local Code = TeleportService:ReserveServer(4701493313)
TeleportService:TeleportToPrivateServer(4701493313,Code,Playerss)
else
print(Error)
end
end
end)
What game are you running this script from?
Make sure that it is eligible for teleporting to your target place:
I just tried to teleport to a story game thats doing well still getting the [HTTP 403 (Forbidden)
Are you testing this in studio or in the actual game? Teleportation is restricted in studio testing.
Yes i know but it should say “Can’t teleport in studio”
It’s teleporting but i need to type game.Players:FindFirstChild(“Andueey”) and then it would teleport but I can’t get the teleport thing to teleport everyone in the table
–//Variables
local PlayerTable = {}
local TeleportService = game:GetService(“TeleportService”)
local Id = 3387051590
–//TeleportHandler
script.Parent.Touched:Connect(function(Touched)
if Touched.Parent:FindFirstChild(“Humanoid”) then
local Character = Touched.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
table.insert(PlayerTable,Player)
else
return
end
if #PlayerTable >= 1 then
TeleportService:Teleport(Id,PlayerTable)
end
end)
It’s giving a warning Invalid player to teleport
I thought you wanted to use :ReserveServer() so I had made this script, however looking at the last script you posted I’m not sure if this is what you want to do.
wait()
local Players = game:GetService("Players")
local PlayerTable = {}
local TeleportService = game:GetService("TeleportService")
script.Parent.Touched:Connect(function(Touched)
if Touched.Parent:FindFirstChild("Humanoid") then
local Character = Touched.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
table.insert(PlayerTable, Player)
if #PlayerTable >= 1 then
local Succes, Error = pcall(function()
local Code = TeleportService:ReserveServer(game.PlaceId)
end)
if Succes then
local Code = TeleportService:ReserveServer(game.PlaceId)
TeleportService:TeleportToPrivateServer(game.PlaceId, Code, PlayerTable)
else
print(Error)
end
end
end
end)
I tested this script and it worked fine for me.
Made my own and i got that working, but thanks for your support
You can’t be teleported in Roblox Studio, you must test it published in roblox.
Yeah, i know But, its fixed now
You should say what helped you to solve the issue. That way, other people with a similar issue can get help.
local PlayerTable = {}
local TeleportService = game:GetService(“TeleportService”)
local Id = 4701493313
–//TeleportHandler
script.Parent.Touched:Connect(function(Touched)
if Touched.Parent:FindFirstChild(“Humanoid”) then
local Player = Players:GetPlayerFromCharacter(Touched.Parent)
table.insert(PlayerTable,Player.Name)
else
return
end
if #PlayerTable >= 6 then
for i,v in pairs(PlayerTable) do
TeleportService:Teleport(Id,game.Players:FindFirstChild(v))
end
end
end)