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: New roblox update where only one key registers?

Previous Thread :: Next Thread 
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
10 Apr 2015 06:57 PM
If you try to use like a sprint key in game and scroll out using your mouse wheel at the same time it won't let you. Anyone know why?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:01 PM
You probably aren't using UserInputService.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
10 Apr 2015 07:03 PM
1. I'm using the regular KeyDown

2. They obviously changed something in the past day. Worked before.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:05 PM
regular old KeyDown is depreciated

--

the only reason it still works at all is so that old games and tools don't break

you shouldn't use it in new scripts.

UserInputService is the way to go.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
10 Apr 2015 07:08 PM
That's not the point... they wouldn't purposely break it...
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
10 Apr 2015 07:12 PM
KeyDown should go down! UserInputService FTW


But seriously, you just don't use it anymore, that's the problem. They've obviously limited the support to encourage the use of UIS
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
10 Apr 2015 07:14 PM
The problem with mouse stuff is only one event fires each script refresh so if you are scrolling the same time you press a key it aint gon fire both of em
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:19 PM
UserInputService is the answer.

You are not suppose to use KeyDown because UserInputService can do EVERYTHING that KeyDown can do, plus infinitely more.

It was invented as an upgrade, a completely new service that is better and can extend to multiple platforms.
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
10 Apr 2015 07:22 PM
UIS is awesome but looks like trash and isn't user friendly
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:25 PM
'looks like trash and isn't user friendly'

>unexperienced scripter
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
10 Apr 2015 07:26 PM
I'm not inexperienced and will use it in the future I just think it looks really terrible. Also could you quick tell me how to stop the input from when your typing?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:30 PM
local UIS = game:GetService('UserInputService')

UIS.InputBegan:connect(function(input, gameProcessedEvent)
if not gameProcessedEvent then
if input.KeyCode == Enum.KeyCode.B then
print('pressing B, but not while typing')
end
end
end)

--

the second line in the function checks to make sure the local player isn't typing

Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
10 Apr 2015 07:32 PM
Ummm, don't you mean the 1st line in the function?
The 2nd line in the function is:

if input.KeyCode == Enum.KeyCode.B then


lol
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
10 Apr 2015 07:37 PM
oops

sorry about that

first line in the function :)
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