Problem/Question: Even though I have a table in a datastore (I have checked!), when I request it it seems to not print the players in the table for some reason.
Code:
messagingService:SubscribeAsync("SendPlayersIn",function(message)
print(message.Data)
SENDING = true
local CurrentPlayersInQueueList = QueueDataStore:GetAsync("PlayersWaitingInQueue")
for i, plr in ipairs(CurrentPlayersInQueueList) do
print("here's all the players: (none if there are none printed)")
print("plr: "..plr.Name)
print("and here is the table thingy:")
print(CurrentPlayersInQueueList)
if SENDING then
print("sending brudda")
if game.Players:FindFirstChild(plr) ~= nil then
print("teleporting ".. plr.Name)
TPservice:Teleport(5340537801, plr, teleportData)
print("teleported")
end
else
print("stopped bruhhhhhh srry")
end
end
end)
I have checked the datastore and all of the queueing players (my alts) are in there. For extra debugging and more info, it is not even printing the players in the table. Respond if you need more code as this is a lot of scripting but I'm pretty sure that the problem is located within this bit of code.
Edits: This is a 1-server queue system, and the hosts will be in the event server, and can click a button on a GUI to send a message via MessagingService to the other servers, to tell them to start teleporting people.
Thanks for reading!

1 comment
I would highly recommend using OrderedDataStores in this situation over a regular one. But to save DataStore requests and yielding you could send all the players userid's that need to be teleported included in the message.