Teleporting error but also technically isn't an error?

Im having this extremely wierd issue, I have a game with about 8 player average. The game uses place teleportation.

BUT here is the issue, 99% of the people can get teleported, BUT A FEW PEOPLE CANT, EVEN WITH 70 PING OR SO WITH EXTREMELY GOOD WIFI.

One of my qa tester got this issue on his account, he contacted roblox support but not really recieved an actual answer.
After creating a new account it works perfectly fine.

This issue seems to be selective to accounts? Maybe it has to do with my game being 13+ (blood and gore)?

The teleport scripts isn’t some hacky way either.

Its just TeleportAsync with just 5 lines of code.

It’s probably not code errors too, it works 100% fine with most accounts and my alt (I tried 40+ times rejoining, all worked perfectly)

Even with 1000 ping also works

But it’s just specific to some accounts?

1 Like

TeleportService fails a lot, you should build a retry function and catch the TeleportService.TeleportInitFailed:Connect(handleFailedTeleport) in order to retry.

This is a very good example from TeleportService Documentation:

local TeleportService = game:GetService("TeleportService")

local ATTEMPT_LIMIT = 21
local RETRY_DELAY = 1
local FLOOD_DELAY = 15

local function SafeTeleport(placeId, players, options)
	local attemptIndex = 0
	local success, result -- define pcall results outside of loop so results can be reported later on

		success, result = pcall(function()
			return TeleportService:TeleportAsync(placeId, players, options) -- teleport the user in a protected call to prevent erroring
		attemptIndex += 1
		if not success then
	until success or attemptIndex == ATTEMPT_LIMIT -- stop trying to teleport if call was successful, or if retry limit has been reached

	if not success then
		warn(result) -- print the failure reason to output

	return success, result

local function handleFailedTeleport(player, teleportResult, errorMessage, targetPlaceId, teleportOptions)
	if teleportResult == Enum.TeleportResult.Flooded then
	elseif teleportResult == Enum.TeleportResult.Failure then
		-- if the teleport is invalid, report the error instead of retrying
		error(("Invalid teleport [%s]: %s"):format(teleportResult.Name, errorMessage))

	SafeTeleport(targetPlaceId, {player}, teleportOptions)


return SafeTeleport
1 Like

I did used teleportinnitfailed

The issue is account related.

I got another person with the issue trying with a new account, worked for that account but nit the main account.

Like theres a non existent ban script

1 Like

Then, when the Teleport failed, what error do you get in the output? That explains everything.
And you built a retry function for teleport service with only 5 lines of code?

1 Like

The i tried with the innit failed before with 40+ lines of code, then it doesnt work so i made it 5 lines to test if it works

I cannot seem to get the error since me myself doesnt get the error thus cannot view what is the error

1 Like

You need the TeleportInitFailed, otherwise you will not know the reason of the failure.
I’ve never experienced teleports failing due to accounts. If your game is 13+ blood and gore, players not allowed to join I guess should not be able to even join the game, and not issues related with teleportation

1 Like

Just added the function, gonna ask my tester to retry.

Connect the TeleportInitFailed to a Datastore, and save the name of the player, the timestamp and the error got, so you can check the error later when you are online

Still doesnt work for him, if the data store method doesn’t return anything I’m filing a roblox support

1 Like