local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")

function updateBoard(board, data)
    for k,v in pairs(data) do
        local pos = k
        local name = v.key
        local score = v.value
        local nametextbox = board.SurfaceGui:FindFirstChild("Name" .. pos)
        nametextbox.Text = name
        local scoretextbox = board.SurfaceGui:FindFirstChild("Score" .. pos)
        scoretextbox.Text = score
    end 
end

while true do
    local pages = ods:GetSortedAsync(false, 8)
    local data = pages:GetCurrentPage()
    updateBoard(game.Workspace.HighScore.TopBlock, data)
    wait(0.1)
    updateBoard(board, data)
end

It has a players score working and all, and if they get a new score the board dosent update. Everyone has to leave server and rejoin for bord to update. Is there a way to just get the board to update auto-matically?