PluginMenu is created but can't show up

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:AddNewAction("Folder", "New Folder", "")
	ItemContextMenu:AddNewAction("Script", "New Script", "")
	ItemContextMenu:AddNewAction("Cut", "Cut", "")
	ItemContextMenu:AddNewAction("Copy", "Copy", "")
	ItemContextMenu:AddNewAction("Paste Into", "Paste Into", "")
	ItemContextMenu:AddNewAction("Rename", "Rename", "")
	ItemContextMenu:AddNewAction("Delete", "Delete", "")
		local selectedAction = ItemContextMenu:ShowAsync()

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.

1 Like