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: Getting keyboard input without tool

Previous Thread :: Next Thread 
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 02:44 PM
Right, so I tried to get input from a key using this:

sp = script.Parent
activ = sp.Activ
player = game.Players.LocalPlayer
mouse = player:GetMouse()
skillkey = sp.Parent.NumberVal -- An IntValue with the value "1"

mouse.KeyDown:connect(function(key)
if key == skillkey.Value then
print("Skill key " ..skillkey.Value.. " pressed")
activ = true
end
end)

I looked at this wiki page for reference: http://wiki.roblox.com/index.php/Taking_keyboard_input
I get no errors, the print statement doesn't get printed... It just doesn't work.
What am I doing wrong here?
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 02:55 PM
Sorry for bumping so fast, but I'm in a bit of a hurry. Thanks.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Feb 2014 02:58 PM
wow u waited 1 min
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 02:59 PM
11 minutes, lol
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
11 Feb 2014 03:01 PM
You cannot use the number keys as they're "reserved" for the backpack.
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 03:03 PM
Are they still reserved if I disable the CoreGui?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Feb 2014 03:05 PM
o

my apology good sir
Report Abuse
solvar is not online. solvar
Joined: 22 May 2011
Total Posts: 149
11 Feb 2014 03:06 PM
Yea I was wondering same thing if you disabled the inventory would u be able to use them?
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
11 Feb 2014 03:07 PM
"Are they still reserved if I disable the CoreGui?"
No. Also, change the IntValue to a StringValue. Currently you'd be comparing a string with a number.
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
11 Feb 2014 03:08 PM
If you remove the backpack coregui, or the backpack itself, the keys are free.
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 03:12 PM
Alright, thanks a lot for your time DataStore. Works perfectly now ^^
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