Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I check if the current server is the newest server?

Asked by
Nickelz 37
6 years ago

If you see Murder Mystery there is a GUI that tells if it is the newest version of the server. How would I achieve this?

1 answer

Log in to vote
2
Answered by 6 years ago

You can use the MarketplaceService which you can use GetProductInfo to return data about the asset. One value returned is the "Updated" which is the "Timestamp of the most recent time the author of the asset modified it "

Example:-

local hasUpdate  = false

spawn(function()
    local curTime = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Updated
    while true do
        hasUpdate  = ( curTime ==  game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Updated)
        wait(1000)
    end
end)

-- other code

I hope this helps.

Ad

Answer this question