local dataStoreService = game:GetService('DataStoreService')
local orderedData = dataStoreService:GetOrderedDataStore('OrderedData')
local replicatedStorage = game:GetService('ReplicatedStorage')
local eventFolder = replicatedStorage:WaitForChild('EventFolder')
local updateBoard = eventFolder:WaitForChild('UpdateBoard')
while true do
local pages = orderedData:GetSortedAsync(false, 100)
local data = pages:GetCurrentPage()
for _, player in pairs(game.Players:GetPlayers()) do -- Stopping here
if player then
print('Fire')
updateBoard:FireClient(player, data)
print('Fired')
end
end
wait(300)
end
When I test in studio, it works perfectly, prints the stuff, etc.
But online, it doesn't. No errors. It doesn't print any lines. It stops where I have indicated, but I don't know why it's stopping at that spot, because it shouldn't

1 comment
The code will probably run before there are any players in the game. I would also recommend that you use FireAllClients and that you store this data on the server where players can ask for it when they join the game.