How to check if plugin is on the newest version?

I am currently working on my first plugin and would like to
find out if the plugin needs an update. (In the plugin with a script)
Is there a way to find out?

1 Like

Uhm, Plugin on toolblox that you can install You can understand if they need to update simply from the “Plugin” tab (Plugin) → Manage Plugin on roblox studio An “update” button should appear.

Instead, if you talk about your plugins every time you publish a version, roblox will automatically bring up the update button, once clicked the plugin will update to the latest version you have published

I don’t need to know HOW to update a plugin! I want to detect if the Plugin needs to updated IN the plugin!

1 Like

Oh Alright, I would use: MarketplaceService:GetProductInfo

Created (Is the is the parameter that says when you have created a certain object)
Instead Updated (Is the is the parameter that says when you have updated a certain object)

Just save Updated parameter and then every time compare it with the new one

3 Likes

Of course not! I want to find out up the own plugin needs an update!

local marketplace = game:GetService("MarketplaceService")
local pluginId = 0 --Change to plugin's ID.
local pluginVersion = "1.2.3" --Current plugin's version.

local function checkIfUpdated()
	local success, result = pcall(function()
		return marketplace:GetProductInfo(pluginId)
	end)
	
	if success then
		if result then
			if result.Description ~= pluginVersion then
				print("Plugin has updated to version "..result.Description..".")
			end
		end
	else
		warn(result)
	end
end

task.spawn(function()
	while task.wait(60) do --Every minute.
		checkIfUpdated()
	end
end)
2 Likes