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: Chat + Binded keys

Previous Thread :: Next Thread 
ColdDeveloper is online. ColdDeveloper
Joined: 25 Jan 2010
Total Posts: 3344
16 Oct 2016 09:41 PM
Hey, I was just wondering what the best way to avoid key-based objects being pressed while chatting. For example if someone types a word with "F" in it then it will cause the flashlight to toggle.


Report Abuse
Darkenus is online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
16 Oct 2016 09:59 PM
huh, im actually curious how other games do it.

the only way i can think of is if the chat key is clicked '/' then remove the keybind, then when enter is clicked afterwards, readd the keybind.

its really inefficient though. id inspect other scripts tbh
Report Abuse
Lykaon is not online. Lykaon
Joined: 27 Oct 2014
Total Posts: 784
16 Oct 2016 10:01 PM
Might be due to other scripts interfering or someone just typed some REALLY BAD code that it screwed up to have that.

It honestly shouldn't do that. Ever.


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
16 Oct 2016 10:02 PM
Nope

UserInputService returns Game Processed Event as well after the input object

basically toggles between true or false whether or not the action is being performed on top or over a gui.
Report Abuse
Aliics is not online. Aliics
Joined: 29 Sep 2014
Total Posts: 471
16 Oct 2016 10:02 PM
game:GetService('UserInputService').TextBoxFocused

and

game:GetService('UserInputService').TextBoxFocusRelease


also the parameters for both of these returns the name of the textbox in question, so you can check that too if you'd like.


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
16 Oct 2016 10:03 PM
*InputBegan, InputEnded, and InputChanged in the UserInputService
Report Abuse
Lykaon is not online. Lykaon
Joined: 27 Oct 2014
Total Posts: 784
16 Oct 2016 10:03 PM
^ Never really had that happen. Oh well, thanks for info.


Report Abuse
Aliics is not online. Aliics
Joined: 29 Sep 2014
Total Posts: 471
16 Oct 2016 10:03 PM
TextBoxFocusReleased*


Report Abuse
ColdDeveloper is online. ColdDeveloper
Joined: 25 Jan 2010
Total Posts: 3344
17 Oct 2016 01:33 AM
I ended up using Focused and FocusLost to disable/enable the localscripts responsible for the keys.


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
17 Oct 2016 01:40 AM
you can always just use user input service and check if the second argument is true or if it is false, it depends

when it is your desired outcome, it should either work only when you type into a textbox or only when youre not typing into a textbox
Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
17 Oct 2016 06:20 AM
Use a custom chat bar with focus and focus losted


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