I'm trying to create a script that teleports a group of players if they are "Ready" for the game, but whenever I try to use Teleport Party A Sync or Teleport To Private Server, it comes up with an HTTP 403 Error. Here's the code:
local timeleft = game:GetService("ReplicatedStorage"):WaitForChild("TimeLeft")
local teleserv = game:GetService("TeleportService")
local gameid = 3171170063
while true do
for a = 1,timeleft.Value do
timeleft.Value = timeleft.Value - 1
wait(1)
end
for _,plr in pairs(game.Players:GetChildren()) do
if plr:WaitForChild("Ready").Value == true and plr:IsA("Player") then
print(plr.Name.." is ready to be teleported!")
local reserve = teleserv:ReserveServer(gameid)
teleserv:TeleportToPrivateServer(gameid,reserve,plr)
else
print(plr.Name.." was not ready for the party.")
end
end
wait(5)
timeleft.Value = 45
end

1 comment
Thanks