hello! i'm making a game where its simply a hall with a lot of screens with random games on them that you can join. at the moment i'm attempting to make a blacklist so if a player failed to teleport then add the id of it to the blacklist. the problem is i don't know how to do that and nothing that i have found solved it.

i tried this:


game.Players.PlayerAdded:Connect(function(player)
	local playerOnTeleport = player
	player.OnTeleport:Connect(function(teleportState, placeId, spawnName)
		if teleportState == Enum.TeleportState.Started then
			print("Teleport started ("..playerOnTeleport.Name..")")
		elseif teleportState == Enum.TeleportState.WaitingForServer then
			print("Teleport waiting for server ("..playerOnTeleport.Name..")")
		elseif teleportState == Enum.TeleportState.InProgress then
			print("Teleport in progress ("..playerOnTeleport.Name..")")
		elseif teleportState == Enum.TeleportState.Failed then
			print("Teleport failed! ("..playerOnTeleport.Name..")")
datastore:SetAsync(placeId.."Banned")
		end
	end)
end)

but it did not work, so the other solution is TeleportInitFailed, but that does not have a perimeter of the gameid that the player failed to teleport to.

is there a way to get the game id from TeleportInitFailed? if not, how would i make the blacklist