PluginMenus don't display after updating/refreshing the plugin

For those who are unaware of what PluginMenus are:

Image Example

PluginMenu%20Example

If the plugin requires an update, or if it gets refreshed in any other way, that menu made by the plugin will no longer appear via the ShowAsync() function. It will work just fine after restarting Studio.


Replicating the bug

  • Make a plugin with this code:
------||VARIABLES
--Services
local Selections = game:GetService("Selection")
----Essentials
local ToolBar = plugin:CreateToolbar("Flood Escape 2")
local Button = ToolBar:CreateButton("Map Making Assistant","WIP","rbxassetid://2195531164")
local Mouse = plugin:GetMouse()
local deb = false
----Plugin Menus
local PluginMenu = plugin:CreatePluginMenu(math.random(),"Test Menu") PluginMenu.Name = "Water Menu"
PluginMenu:AddNewAction("ActionA","A","rbxassetid://3880356701")
PluginMenu:AddNewAction("ActionB","B","rbxassetid://3880357001")
------||COMMANDS
----||Selection Listener
local function Selecting() --if not on then return end (ignored for now)
local Selected = Selections:Get()[1]
	if Selected and Selected:IsA("BasePart") then
	local Action = PluginMenu:ShowAsync()
		if Action then print("Action made:",Action.Text)
		else print("No action was taken.")
		end
	end
end
----||Button and Toolbar
function ButtonClick()
lastClicked = tick()
on = not on
plugin:Activate(on)
Button:SetActive(on)
end
------||CONNECTIONS
Button.Click:Connect(ButtonClick)
Selections.SelectionChanged:Connect(Selecting)

plugin.Deactivation:Connect(function()
	if not deb and (tick()-lastClicked)>1 then
	deb = true
		if on then on = false end
	plugin:Activate(false)
	Button:SetActive(false)
	wait()
	deb = false
	end
end)
  • Install it into your Studio (then test to see if the menu does show).
  • Update the script in any nonsignificant way (such as adding a comment line).
  • Update the plugin after publishing the new version.
  • Repeat what you did to get it to show before.

At this point, it shouldn’t appear. Restart Studio, then it should appear again.


This occurs 100% of the time, and I’m unsure of when this bug had started. I’ve only been using this feature very recently.

3 Likes

Came across this just now as I’m experiencing the same issue. I’m making a plugin which uses PluginMenu as its core menu and testing is extremely inconvenient since I have to restart Roblox Studio after each refresh.

EDIT: According to users of my new plugin, this issue does not only occur when refreshing or reactivating a plugin.
I also figured, whenever it’s not working, launching test mode does appear to make it work until you quit test mode which breaks it again.

1 Like

In my case it won’t work at all. I restarted studio several times and nothing happened. This just made me give up.

1 Like

This is still a problem. Is there any update on getting this fixed? As a plugin developer, this is a huge pain to deal with. I thought the feature was either entirely broken or disabled.

It never works at all with a dev tool like HotSwap. You have to actually publish the plugin (locally or on the site; have to update the plugin if published to the site), and then restart Studio.

8 Likes

Does anyone know if there is a fix for this? I just spotted the same problem.

This bug actually occurred when I was adding the menu for the first time, after having made a few updates to my plugin. I couldn’t figure out what I was doing wrong with the menu, then I closed Studio and reopened and it worked first time!

1 Like