Hi! I am currently having issues with my teleport system which btw uses Reserved servers. Everytime I try and teleport a multiple players to a server then always 1 person says attempted to teleport to a place thats restricted. And before you ask yes I did enable HTTP Requests and Third Party teleports. Here’s my script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TeleportService = game:GetService("TeleportService")
local Code = TeleportService:ReserveServer(14538216434)
local Game = ReplicatedStorage.Game
local GUI = Game.GUI
local RemoteEvents = Game.RemoteEvents
RemoteEvents.TeleportParty.OnServerEvent:Connect(function(player,Owner)
if player.Name == Owner then
local ServerMembers = {}
for _,v in pairs(ReplicatedStorage.Servers:FindFirstChild(Owner):GetChildren()) do
table.insert(ServerMembers,game.Players:FindFirstChild(v.Value))
end
print(Code)
TeleportService:TeleportToPrivateServer(14538216434,Code,ServerMembers)
end
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TeleportService = game:GetService("TeleportService")
local id = 14538216434
local Game = ReplicatedStorage.Game
local GUI = Game.GUI
local RemoteEvents = Game.RemoteEvents
RemoteEvents.TeleportParty.OnServerEvent:Connect(function(player, Owner)
if player.Name ~= Owner then return end
local Code = TeleportService:ReserveServer(id)
local ServerMembers = {}
for _, v in ReplicatedStorage.Servers:FindFirstChild(Owner):GetChildren() do
table.insert(ServerMembers, game.Players:FindFirstChild(v.Value))
end
print(Code)
local TO = Instance.new("TeleportOptions")
TO.ReservedServerAccessCode = Code
TeleportService:TeleportAsync(id, ServerMembers, TO)
end)
This works but instead of reserving the server it uses 1 code for all the servers which means that if 1 person joins and teleports to a reserve server and if someone else joins and teleports then they get teleported to the same reserved server
Nevermind all i had to do was put the local Code = TeleportService:ReserveServer(id)
inside of RemoteEvents.TeleportParty.OnServerEvent:Connect(function(player, Owner) if player.Name ~= Owner then return end local ServerMembers = {} for _, v in ReplicatedStorage.Servers:FindFirstChild(Owner):GetChildren() do table.insert(ServerMembers, game.Players:FindFirstChild(v.Value)) end print(Code) local TO = Instance.new("TeleportOptions") TO.ReservedServerAccessCode = Code TeleportService:TeleportAsync(id, ServerMembers, TO) end)