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

Key Code for Right Mouse Button?

How would you make it so that something is done when the right mouse button is clicked? [Also, it has to be compatible with this:

if key == "(right mouse button)"  then
-- code
end

1 answer

✓ Accepted answer

Well, It's MouseButton2Down. So...

mouse = game.Players.LocalMouse:GetMouse()
mouse.Button2Down:connect(function()
	print("Right click!")
end)

2 comments

0

Thanks.

0

Thank me by Accepting this answer!

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