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 » Scripters
Home Search
 

Re: key for right click

Previous Thread :: Next Thread 
Link5659 is not online. Link5659
Joined: 04 Jun 2012
Total Posts: 4525
03 Aug 2015 10:02 PM
title^ like what is the number like if I wanted q id use "q" but what is right click?
Report Abuse
Link5659 is not online. Link5659
Joined: 04 Jun 2012
Total Posts: 4525
03 Aug 2015 10:07 PM
plz
Report Abuse
swagboy1727 is not online. swagboy1727
Joined: 21 Jan 2013
Total Posts: 54
03 Aug 2015 10:07 PM
use this


local Tool = script.Parent
a=false
cam=nil
wut = Tool.Parent



function onEquipped(mouse2)
mouse2.KeyDown:connect(onkeyDown)
mouse = mouse2
end
function onkeyDown(key)
if key == "q" then
if not a then
cam=game.Workspace.CurrentCamera:clone()
cam.Parent=game.Workspace
game.Workspace.CurrentCamera.CameraSubject = Tool.Zoom
game.Workspace.CurrentCamera.CameraType=1
Tool.Recoil.Value = 5
Tool.ZoomedIn.Value = true
Tool.Parent.Humanoid.WalkSpeed = 10
a=true
else
game.Workspace.CurrentCamera.CameraSubject=game.Players.LocalPlayer.Character
game.Workspace.CurrentCamera:Remove()
game.Workspace.CurrentCamera=cam
Tool.ZoomedIn.Value = false
Tool.Recoil.Value = 10
Tool.Parent.Humanoid.WalkSpeed = 16
a=false
end
end
end




script.Parent.Equipped:connect(onEquipped)
Report Abuse
Link5659 is not online. Link5659
Joined: 04 Jun 2012
Total Posts: 4525
03 Aug 2015 10:17 PM
that's a free model + doesn't work m80
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
03 Aug 2015 10:23 PM
Yeah thats a bad aim down sights script
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
03 Aug 2015 10:30 PM
local mouse = game.Players.LocalPlayer:GetMous()

mouse.Button2Down:connect(function()
--do stuff
end)
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Aug 2015 10:34 PM
local uis = game:GetService("UserInputService")

uis.InputBegan:connect(function(input, gpe)
if not gpe and input.UserInputType == Enum.UserInputType.MouseButton2 then
print("mouse button2 down")
end
end)

non-deprecated version
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
03 Aug 2015 10:35 PM
sorry, still living in the old age
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Aug 2015 10:40 PM
Me too Vyxium, and probably always will... Besides I think this is easier to read:

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button2Down:connect(function()
--do stuff
end)
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Aug 2015 10:41 PM
we frown upon ye oldbags

>:(
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Aug 2015 10:42 PM
Well when you need help, it's the oldbags you come to for it... So don't frown too much, or you will get a stinky version of oldbag scripting.
Report Abuse
Link5659 is not online. Link5659
Joined: 04 Jun 2012
Total Posts: 4525
04 Aug 2015 04:45 PM
that function does not work :/ it still works the same but dose not detect weather or not its right click/left click because "q" is the main set but I want to be able to use "q" or right click :/ #OldAge still don't understand the new stuff
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
04 Aug 2015 06:24 PM
Button1Down is left click, Button2Down is right click... What more needs to be understood about this?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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