|
| 14 Mar 2017 04:43 PM |
| Hey I'm new to scripting. I have a script for an animation but when I type to chat with my friends, it activates when I don't want it to. How do I fix that? Message me if you want to help. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 14 Mar 2017 04:45 PM |
| Why does it do that? #### #### |
|
|
| Report Abuse |
|
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |
|
|
| 14 Mar 2017 05:03 PM |
This is an issue with UIS not textbox.
In UIS.Inputbegan() you have 2 main argument thingies, key, and processed.
simple change the first line of your inputbegan to
game:GetService('UserInputService').InputBegan:connect(function(key,processed) if processed then return end -- this checks if you are say, typing in a chat bar.
|
|
|
| Report Abuse |
|
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 15 Mar 2017 02:22 AM |
What do you mean it activates when you don't want it to?
|
|
|
| Report Abuse |
|
|
|
| 15 Mar 2017 10:52 AM |
| Like for example my key that I will be pressing for the animation to activate is Q. BUT when I am chatting with my friends like typing in the chatbox and I press Q in the sentence that i am typing to talk to my friends, the animation just activates when I didn't want it to. |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2017 10:53 AM |
That's where the `gameProcessedEvent` parameter comes in.
|
|
|
| Report Abuse |
|
|
|
| 15 Mar 2017 11:08 AM |
| I'm so confused ;-; I was told to use TextBoxFocus and now gameProcessedEvent ;-; |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2017 11:14 AM |
It's an argument that is passed by the InputBegan event. It passes true if a GuiObject is in focus and false otherwise.
|
|
|
| Report Abuse |
|
|