You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Im trying to achieve a separate queue system but im not sure how to approach it, if you dont know what a separate queue system is, basically if a player makes a server and a person join, that server is one queue for those who want to join that server (this teleports people in the specific queue to another place) -
What is the issue? Include screenshots / videos if possible!
not sure what to approach -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive tried to use tables within tables but im not sure how to use it properly because i cant find a way to insert players inside of the queue within a table. (this table within the table would be named the player name so that who ever created that server, the person who joins can go into the right queue)
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local PlayersInQue = {}
local repser = game:WaitForChild("ReplicatedStorage")
repser:WaitForChild("createserver").OnServerEvent:Connect(function(player)
PlayersInQue[player.Name] = player
end)
local queue = repser:WaitForChild("queue")
queue.OnServerEvent:Connect(function(player, name)
--Here is where people can get in a queue
wait(1)
print(PlayersInQue)
end)
game:GetService("ReplicatedStorage"):WaitForChild("teleport").OnServerEvent:Connect(function(player)
print("teleporting")
local reservedServerCode = TeleportService:ReserveServer(myserverid)
local teleportOptions = Instance.new("TeleportOptions")
teleportOptions.ReservedServerAccessCode = reservedServerCode
SafeTeleport(myserverid, PlayersInQue[player.Name], teleportOptions)
end)
Anything to do with the table queue system is not right, it connects with the problem im dealing with