I have 2 problems here is the relevant code:
local TeleportService = game:GetService("TeleportService") local level1Id = 1564858890 function MovePlayers () local players = script.Parent.Parent.Parent.PlayerNames:GetChildren() -- where i keep a bunch of values that have the names of players for i = 1, #players do local player = game.Players:FindFirstChild(players[i]) TeleportService:Teleport(level1Id, player) end end local Count = 75 while true do if Count > 0 then MovePlayers() end end
One is it apparently cant find the player which is weird. because all the values are named after the player.
Also i need a wait after it sends the group of players because it keeps doing it every second. but i want to add a wait in the function so that the script waits until the batch of players are sent before running the script again