So i was wondering how to make a queue script
and im wondering if this is how u do it.
if 10 values are in the table, it searches for the player and teleports
them to the game
--// Variables
local QueueTable = {}
local Max = 10
local id = "dont worry about this. i dont have one yet"
--// Code
script.Parent.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild('Humanoid') then
local N = Hit.Parent.Name
table.insert(QueueTable,N)
if QueueTable[10] then
local Players = game.Players[QueueTable[N]]
game:GetService('TeleportService'):Teleport(id,QueueTable[N])
end
else print(360..' Ooga booga')
return false
end
end
end)