[FIXED] Problems with teleporting

You should say what helped you to solve the issue. That way, other people with a similar issue can get help. :slight_smile:

local PlayerTable = {}
local TeleportService = game:GetService(“TeleportService”)
local Id = 4701493313
–//TeleportHandler
script.Parent.Touched:Connect(function(Touched)
if Touched.Parent:FindFirstChild(“Humanoid”) then
local Player = Players:GetPlayerFromCharacter(Touched.Parent)
table.insert(PlayerTable,Player.Name)
else
return
end
if #PlayerTable >= 6 then
for i,v in pairs(PlayerTable) do
TeleportService:Teleport(Id,game.Players:FindFirstChild(v))
end
end
end)