local teleportOptions = Instance.new("TeleportOptions")
teleportOptions:SetTeleportData({
["earned"] = money[plr],
["nonce"] = HttpService:GenerateGUID(false):lower()
})
local function TeleportPlayer(player)
local success, errorMessage = pcall(function()
TeleportService:TeleportAsync(placeId, {player}, teleportOptions)
end)
if not success then
wait(2)
TeleportPlayer(player)
end
end
TeleportPlayer(Players:GetPlayers()[1])
Oddly enough, being teleported a second time (to the third game) runs it successfully. So what’s the issue?
Your function is recursive so if the success variable is repeatedly false then your function will run for an eternity not allowing the code below to run. You should have a retry system instead where if you reach the max amount of tries you stop trying to teleport the player