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: My first time with User Input Service

Previous Thread :: Next Thread 
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
26 May 2015 05:00 PM
Vhat's wrong?

local uis = game:GetService("UserInputService")

uis.InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input == "W" then
print("W")
end
end
end)

No errors, just doesn't print W.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:02 PM
"My first time"
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
26 May 2015 05:02 PM
Check if a key is being pressed by it's KeyCode.

if input.KeyCode == Enum.KeyCode.W then
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
26 May 2015 05:03 PM
Tell it to be gentle.

Remember, your first time is about you; not them. Don't let it take advantage mk?
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
26 May 2015 05:03 PM
shut up
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:04 PM
lmfao
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
26 May 2015 05:04 PM
I hope I wasn't wrong to think Scripters are generally more mature than what is being displayed here.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
26 May 2015 05:06 PM
"I hope I wasn't wrong to think Scripters are generally more mature than what is being displayed here."

I'm here a lot.

(I just changed my name)

Something happened within the blink of an eye that I cannot put my finger on.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:06 PM
Scripters need time to be immature to stay sane Amanda ;)
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
26 May 2015 05:07 PM
No they don't.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:09 PM
Well obv you don't like to have fun. Get out.
Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
26 May 2015 05:10 PM
Unless you're going to do a 'press any key' there is no reason to check UserInputType since nothing except keys will return Enum.KeyCode values.


Well I think it might return Enum.KeyCode.Unknown but not a 'real' KeyCode.

Also, what the hell is the point of being mature? We're all friends here so stop being a formal prick.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:11 PM
^
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
26 May 2015 05:14 PM
Formality is the glue that holds the Scripting forum together.
Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
26 May 2015 05:17 PM
Metaphors are the crowbar ripping this forum apart.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
26 May 2015 05:17 PM
TimeTicks, you seem to be in the wrong place. You will find in ATR, OT, RT, and nearly any other subsection the main population is people like you who crack jokes and "need to be immature to stay sane". You'll note that I don't, and that most people who come here don't, because this isn't Comedy Central, it is Scripters.

However, don't worry. I understand that you cannot handle intelligent discussion and being helpful instead of being funny. Feel free to stay and continue doing whatever you wish, however from this point on note that your behavior here is just reflecting yourself, and not this subsection as a whole.

-amanda
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
26 May 2015 05:18 PM
Gamepad controls are listed as KeyCodes, and there is plenty point of checking which kind of input is being used specifically at the time for organizational reasons.
Report Abuse
voItages is not online. voItages
Joined: 02 Nov 2013
Total Posts: 677
26 May 2015 05:20 PM
local uis = game:GetService("UserInputService")

uis.InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.W then
print("W")
end
end
end)



=volty=
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:21 PM
Aww that's cute. Did I pull someones switch? Let me get the popcorn while I laugh hysterically.
Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
26 May 2015 05:22 PM
If you want to know if e is pressed you just need Enum.KeyCode.E check.

Organization is for the weak.
Report Abuse
Garfanzo is not online. Garfanzo
Joined: 24 Apr 2015
Total Posts: 742
26 May 2015 05:25 PM
I normally hate lectures like this, but I'm gonna put this here for all you stuck up scripters -

A man who asks a question is a fool for a minute, but wise for life.

A man who doesn't ask if a fool for life.

Seriously people show a little respect, don't forget how you would have wanted help when you started out doing something.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 May 2015 05:30 PM
Any anyone who has "my first time" in the title is asking for a pun. I will gladly be the first to respond to that. ;)
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
26 May 2015 06:12 PM
Looking through scripters when all of a sudden I find who I wan to have my babies
http://gyazo.com/733038222b3dd9f7fe3cc547a9ef8710
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
27 May 2015 04:10 PM
Note that he used another metaphor.
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 04:11 PM
We aren't robots. T_T



-𝒩 | Anticodist, Scripter
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