I am super confused, I have reviewed the code a thousand times. I can assume that the PluginMenu is created, but when using ShowAsync it is never shown and an infinite yield is also created. It only happens with my plugin, PluginMenus generally work.
This is the code:
local ItemContextMenu = plugin:CreatePluginMenu(math.random(), "ItemContextMenu")
ItemContextMenu.Name = "Actions"
ItemContextMenu:AddNewAction("Open", "Open", "")
ItemContextMenu:AddSeparator()
ItemContextMenu:AddNewAction("Folder", "New Folder", "")
ItemContextMenu:AddNewAction("Script", "New Script", "")
ItemContextMenu:AddSeparator()
ItemContextMenu:AddNewAction("Cut", "Cut", "")
ItemContextMenu:AddNewAction("Copy", "Copy", "")
ItemContextMenu:AddNewAction("Paste Into", "Paste Into", "")
ItemContextMenu:AddNewAction("Rename", "Rename", "")
ItemContextMenu:AddNewAction("Delete", "Delete", "")
workspace.Toggle.Changed:Connect(function()
local selectedAction = ItemContextMenu:ShowAsync()
print(selectedAction)
end)
It is not the whole code of the plugin but a part, but with that part it should already be enough for the PluginMenu to work.