Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What is the enum.keycode for right click?

Hey there, I've been looking for the enum.keycode for right click without using the mousebuttondown function, any help?

7 comments

0

Why not use UserInputService?

0

MouseButton2, although it isn't a KeyCode because it isn't a key.

0

^ Isn't that deprecated? Or am I thinking of a different object

0

No, it isn't deprecated.

0

oh

0

Thus, it should be Enum.UserInputType.MouseButton2.

1 answer

It's not a keycode. When using mouse buttons in a GUI, use:

(path of GUI).MouseButton2Down:Connect(function(RCLICK)

And when using mouse buttons on a physical object, use:

(path of Objct).Button2Down:Connect(function(RCLICK)

Haven't scripted for a while, hope it works, and let me know if it doesn't!

2 comments

0

I'm certain this answer is not what he was looking for, and the second example is not a valid event of any object other than a gui.

0

@AetherProgrammer, the second example is mostly wrong, because when its a gui, you can only use for example Button1Down with a Mouse in the start so ye

This discussion is preserved as it was. New answers, comments, and votes are closed.