generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Right Click?

Previous Thread :: Next Thread 
Mylesj536 is not online. Mylesj536
Joined: 03 Jan 2014
Total Posts: 136
11 Feb 2014 10:12 PM
i have a script that when you click the letter "q" on your keyboard it will aim, i want "right click" to activate it now.
what is code word for "right click" that i can insert into my script?

the actual code for it is


if (key=="q" and GunAim == false and MoveActive == false and Active == false) then
Report Abuse
cade2000 is not online. cade2000
Joined: 09 Aug 2009
Total Posts: 887
11 Feb 2014 10:22 PM
IDK if this is what you mean?

http://wiki.roblox.com/index.php/MouseButton2Down_(Event)

If you're saying only respond to right click while pressing Q then do something like this....


if (key=="q" and GunAim == false and MoveActive == false and Active == false) then
gui.MouseButton2Down:connect(function()
print("It worked bro! :3")
end)
else
return
end

Was that what you were looking for?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 10:28 PM
I think he wanted it to activate if it was rightclicking,instead of pressing q
like
if (key == mouseclick) or something,lol..
Report Abuse
Mylesj536 is not online. Mylesj536
Joined: 03 Jan 2014
Total Posts: 136
11 Feb 2014 11:00 PM
@cade200
i want it to do what "islandmaker2012" said, but his script didnt work ( unless i added it wrong )

i have this command in a big long script so i dont wanna mess too much up with something different, is there something that i can change from the code up above to make it so that when you right click it will aim?

thank you :)
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:02 PM
k,is this in a localscript?if it is then u can define LocalPlayer
plr = game.Players.LocalPlayer
mouse = plr:GetMouse()
mouse.Button2Down:connect(function()
--something like this,would this work?
end)
Report Abuse
jmasterj10 is not online. jmasterj10
Joined: 19 Sep 2010
Total Posts: 735
12 Feb 2014 03:12 AM
^ What he said
Report Abuse
achan10 is not online. achan10
Joined: 10 Dec 2011
Total Posts: 39
02 Nov 2014 07:42 PM
What I was looking for
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image