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
 

Keys?

Previous Thread :: Next Thread 
masta789 is not online. masta789
Joined: 13 Mar 2012
Total Posts: 181
09 Dec 2013 08:27 PM
How does one read the input from a keyboard, And the values?
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
09 Dec 2013 08:28 PM
mouse.KeyDown:connect(function(key)
print(key.." was pressed")
end)

..if that's what you mean, if not idk
Report Abuse
masta789 is not online. masta789
Joined: 13 Mar 2012
Total Posts: 181
09 Dec 2013 08:32 PM
How do i say this, what if i want to check if the person is pressing Ctrl and let's say O at the same time, how does one do that?
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
09 Dec 2013 08:36 PM
event (key)
if key == "t" and "o" then
print ("player presgted t and o")
end
end)
Report Abuse
masta789 is not online. masta789
Joined: 13 Mar 2012
Total Posts: 181
09 Dec 2013 08:54 PM
I keep getting "attempt to index global 'mouse'(A nil value)" is it supposed to be in a local or not?
Report Abuse
masta789 is not online. masta789
Joined: 13 Mar 2012
Total Posts: 181
09 Dec 2013 09:02 PM
In local i get no print, and just a plain script i get Nil value.
Report Abuse
sunday1520 is not online. sunday1520
Joined: 23 Aug 2012
Total Posts: 693
09 Dec 2013 09:04 PM
Did you define the mouse in the local script?
Report Abuse
masta789 is not online. masta789
Joined: 13 Mar 2012
Total Posts: 181
09 Dec 2013 09:08 PM
No, I have no clue what define it as...
Report Abuse
TheEliteDonphan is not online. TheEliteDonphan
Joined: 16 Jun 2013
Total Posts: 2647
09 Dec 2013 09:32 PM
[ Content Deleted ]
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
09 Dec 2013 09:36 PM
mouse.KeyDown:connect(function(k)
if k == 'a' and 'b' then
print("A and B pressed")
end
end)

✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
09 Dec 2013 09:36 PM
Sorry, yeah, didn't define the mouse.

mouse = game.Players.LocalPlayer:GetMouse()


✦мøяƴø子✦
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