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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Press Q to -insert here-?

Previous Thread :: Next Thread 
FPSPwnz0r is not online. FPSPwnz0r
Joined: 27 Jun 2011
Total Posts: 2737
20 Jan 2016 10:07 PM
I think my last few threads have missed out this detail. Just making sure with this post.

You know how when you use mouse.Button1Down:connect(function() and fill in your commands so that it does what you wish when you click? What is used so you can do this with the keyboard, as in when I press a button (let's say E) what I want happens?

TL;DR how to do mouse.Button1Down:connect but by pressing a specific button (say, E) instead

(sorry if you saw my last post and I just didn't follow your directions right)











Report Abuse
FrostOver is not online. FrostOver
Joined: 20 Jun 2013
Total Posts: 299
20 Jan 2016 10:09 PM
local Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Button1Down:connect(function(key,a)
if not a then
local Key = key.KeyCode
if Key == Enum.KeyCode.E then
--code
end
end
end)
Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
20 Jan 2016 10:10 PM
http://wiki.roblox.com/?title=API:Class/UserInputService
Report Abuse
FrostOver is not online. FrostOver
Joined: 20 Jun 2013
Total Posts: 299
20 Jan 2016 10:12 PM
ah crap i tottaly messed up
game:GetService("UserInputService").InputBegan:connect(function(key,a)
Report Abuse
FPSPwnz0r is not online. FPSPwnz0r
Joined: 27 Jun 2011
Total Posts: 2737
20 Jan 2016 11:22 PM
heh, guess I just stink at scripting. I'll do more research. thanks anyways, I'll stop spamming this post


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