New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by
Nickelz 37
1 year 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
kingdom5 5449 Trusted Snack Break Moderation Voter Community Moderator
1 year 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