Game Crash when i try to teleport to another place

You can write your topic however you want, but you need to answer these questions:
1.
I’m working on a project right now where I need to use the teleport service but unfortunately I don’t know why but when I trigger the teleportAsync() function my game freezes and doesn’t even close when I press alt+f4 I couldn’t find anything on the internet, thanks for any help in advance

  1. What is the issue? Include screenshots / videos if possible!
    2023-04-20 11-57-20


  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I try to use pcall like in this tuutorial: Teleporting, Places, Server Communication, DataStore - Roblox Scripting Tutorial - YouTube

           local Players = game:GetService("Players")
			local TeleportService = game:GetService("TeleportService")


			for i, player in pairs(game.Players:GetChildren()) do		
				
				local sucess, result = pcall(TeleportService.TeleportAsync, TeleportService, 13191249762, {player})
			end

this is my script

ok i just don’t publish the game

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.