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: KeyDown in GUI's?

Previous Thread :: Next Thread 
bibbs123 is not online. bibbs123
Joined: 03 Jun 2008
Total Posts: 24994
16 Feb 2013 09:10 PM
If I put a local script in a GUI that checks for KeyDown, would it work?
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
16 Feb 2013 09:13 PM
[ Content Deleted ]
Report Abuse
bibbs123 is not online. bibbs123
Joined: 03 Jun 2008
Total Posts: 24994
16 Feb 2013 09:16 PM
Okay... I didn't know if you could only do it in tools and hopperbins. thanks
Report Abuse
goalzero is not online. goalzero
Joined: 29 Sep 2010
Total Posts: 132
16 Feb 2013 10:27 PM
Also,
If you use a localscript:

local Player = game.Players.LocalPlayer
local MyMouse = Player:GetMouse()

MyMouse.KeyDown:connect(function(key)
if key == 'q' then
print('Victory!')
end
end)

I hope
Report Abuse
bibbs123 is not online. bibbs123
Joined: 03 Jun 2008
Total Posts: 24994
16 Feb 2013 10:59 PM
I just did

function keydown(key)
print(key)
end

script.Parent.Parent.Parent:GetMouse().KeyDown:connect(keydown)
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
16 Feb 2013 11:47 PM
Is your script inside of a LocalScript? If it use, you can use game.Players.LocalPlayer instead of script.Parent.Parent.Parent

[[ Usering ]]
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