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: IsKeyDown?

Previous Thread :: Next Thread 
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
18 Dec 2015 09:39 PM
How to flippin use I tried this
UserInputService.InputBegan:connect(function(UserInput)
if UserInput.UserInputType == Enum.UserInputType.Keyboard then
if UserInput.KeyCode == Enum.KeyCode.Q then
while UserInputService:IsKeyDown(Enum.KeyCode.Q) do
wait()
print("gang was here :3")
end
end
end
end)
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
18 Dec 2015 09:45 PM
I like your thinking, but try making InputBegan flag something to run constantly. Have an InputEnded flag something to end the constantly running loop thing.
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
18 Dec 2015 09:47 PM
I may be wrong on first guess, but I think you use get service for the user input service

game:GetService('UserInputService')
Report Abuse
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
18 Dec 2015 09:50 PM
@Cody, I did that before but I figured this would be nicer as IsKeyDown Is what this is for(I believe :p)
@Rob, I do have that but I forgot to copy :p
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
18 Dec 2015 09:57 PM
Idk I don't see anything wrong with that code...
Report Abuse
VetexGames is not online. VetexGames
Joined: 28 Nov 2009
Total Posts: 149
18 Dec 2015 10:13 PM
I personally don't like UserInputService, I think you should use KeyDown/KeyUp. It's a lot easier to use, even if it is deprecated.



#code while true do end
Report Abuse
Vexture is not online. Vexture
Joined: 27 Jan 2011
Total Posts: 630
18 Dec 2015 10:16 PM
a few problems i noticed
define userinputservice as a variable that equals game:GetService("UserInputService")

and for "userInput," if userInput.InputType == Enum.InputType.input then

not userInputType lol
Report Abuse
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
18 Dec 2015 11:22 PM
Sorry I was away and @Above what do you mean?
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