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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|
achan10
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 39 |
|
| |
|