Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the enum.keycode for right click?

Asked by 5 years ago

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

0
Why not use UserInputService? mybituploads 304 — 5y
0
MouseButton2, although it isn't a KeyCode because it isn't a key. DeceptiveCaster 3761 — 5y
0
^ Isn't that deprecated? Or am I thinking of a different object mybituploads 304 — 5y
0
No, it isn't deprecated. DeceptiveCaster 3761 — 5y
View all comments (3 more)
0
oh mybituploads 304 — 5y
0
Thus, it should be `Enum.UserInputType.MouseButton2`. User#26971 0 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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!

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. User#26971 0 — 5y
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 Igoralexeymarengobr 365 — 5y
Ad

Answer this question