I am currently working on my anti virus plugin and want to create a option where you can right click on a part in a workspace, and scan it.
Here’s the menu Im talking about:
And I want to add an option beside delete and duplicate that when you click a scan happens.
I don’t know if this is possible or not, but if it is, it will be really useful for my plugin.
sorry if this is hard to understand, please tell me if i need to clear things up
I’m sure it’s not possible, but unless one of them could find a way…
I am working on a plugin myself and would be surprised if I missed such an important and interesting information on the Wiki.
Perhaps there’s a way for you to make your own custom UI, and make it show up at a certain pixel height lower and more to the right from the mouse’s position? I’ve never made a plugin before, and don’t know how, but based on my experience with the Mouse object, it might be possible, as long as the default ROBLOX right-click UI is made with offset rather than scale.
Yeah, but I’m pretty sure it’s possible to make the UI a button, right? If it is, you can design it similar to the default ROBLOX UI, and make it clickable. Also, if it’s possible, you might want to consider adding a keybind for it, too.
Yes, but if you design your UI button right, you can make it look like it’s part of the menu, but you may have to have it on the side so it doesn’t overlap the default UI.
I know, but the closest you can get to that is making a similar-looking button next to the default UI, It will look as if it’s in place, the fact that it’s a separate button won’t matter when someone’s using it when it doesn’t appear to be.
But that doesn’t answer my question, does it?
I asked if its possible to add an option to the menu through configuring it through code, not any other ways of achieving this. All you told me was that I could make a SEPARATE gui, which isn’t a “Yes, its possible”, or “No, its impossible.”.
It is the only way, or this or nothing. Just make an UI with the identical UI style as the others and then add it to the whole UI, do you now understand?
So yes, it is possible.
So I don’t know if you know it, but you can just get the mouse object and when a rightclick makes it add your UI part, so I really don’t understand what’s so hard to understand about that.
local Mouse = plugin:GetMouse()
local Gui = YourGuiAndYesYouNeedAGui
local isOn = false
Mouse.Button2Down:Connect(function()
--Do your stuff here
isOn = not isOn
Gui.Visible = isOn
end)
Ack, I know this post is old, but it seems that the right-click menu isn’t impossible. You can make a right-click menu, as shown with CloneTrooper1019’s Tool Grip editor. I’ve gotten a screenshot of a menu that was created:
And It seems to replicate the same properties as the default menu! Even having spacing at the beginning for an icon for the button. This means you can create a separate right-click menu at minimum.
EDIT: You can actually make a right click menu using plugin:CreatePluginMenu()!
Heh, sorry. I just couldn’t find any help on how to make right-click menus on the forum, and finally found it and wanted to help others who can’t find out how to make one.