So I'm trying to make a script that shows a gui once it detects that there is a new update. I'm trying to compare the update times although it keeps being the same. Here's the script. How could I fix this?
local Service = game:GetService("MarketplaceService"):GetProductInfo(494196891) local Version = Service.Updated local Version2 local Service2 while true do wait(1) print(1) Service2 = game:GetService("MarketplaceService"):GetProductInfo(494196891) Version2 = Service2.Updated print(Version) print(Version2) if Version ~= Version2 then local Players = game.Players:GetChildren() for _,v in pairs(Players) do v.PlayerGui.RestartPoll.Poll.Visible = true end end end
I'm not fully experienced with stuff like this, but I believe you can accomplish something like this using DataStores.. I believe you could probably create a "Version" intvalue that holds the current version of the game. Any time you wanted to update the version, you could set that intvalue to the new version number and :SetAsync() it to save to the datastore. I believe datastores share data flawlessly across servers as someone I know made cross-server queue systems using datastore. Anyway, not quite sure if I'm on the right track but I hope I helped.