|
| 01 Oct 2014 12:14 PM |
I have a script that I need to work and it does but I noticed a quirk so I stripped it down to it's simplest form to see if it is me but it isn't. The Click event works great even when clicking fast but it stops working when your are moving and for like a half second afterwords but then resumes working. Can someone help me out and hopefully tell me what's wrong or if there is a workaround to the problem. The script is inside a GUI button:
function Left() print("Left Click") end
function Right() print("Right Click") end
script.Parent.MouseButton1Click:connect(Left) script.Parent.MouseButton2Click:connect(Right) |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 12:21 PM |
| this has nothing to do with walking |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 12:30 PM |
| Then what does it have to do with? |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Oct 2014 12:36 PM |
| What workaround would you suggest in order to detect clicks on part of the GUI while also moving at the same time. I need something that also provides the same functionality because I am also making this for mobile so the player needs the GUI to click action buttons while moving. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Oct 2014 12:58 PM |
| Anyone else out there have any ideas? |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 01:01 PM |
| Also I just tested it on mobile and it triggered the event perfectly even when moving and such. Now I am really confused why the same exact code doesn't get triggered on PC when your player is moving. Anyone out there know of this and have any insight? |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 01:16 PM |
| There might be an issue with the gui being deactivated when walking (doubt it), or it could be something Roblox pushed out to fix a bug, or your connecting to the wrong gui, or it requires a localscript to fire. If you've tested all the above, then you should use the player:GetMouse()'s mouse to access click events and filter them for when the x and y coordinates are inside your gui. Its a dirty hack, but you got to do what you got to do. |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 01 Oct 2014 01:20 PM |
Custom Gui Click Detection System? That seems a bit of an overkill for something like this, but I can't think of anything else.
Sounds like a bug in my opinion, try emailing roblox. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 01:22 PM |
@Arbiter Seeing his script, I assure you he does not know how to do that.
Also, it is probably just a bug. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 01:33 PM |
| The script that I posted is a highly dumbed down version of the actual one I am using in my world just to see if the problem was from me. I guess I will have to end up doing the click detection system. After all it is only for a single button but it still would be nice if roblox actually worked. I will also email them at info@roblox.com. I never had the need to do this before so if there is a different email address I should send it to please let me know and thanks for all of the help. |
|
|
| Report Abuse |
|
|